Skip to content

Commit

Permalink
T6712: Add nonproduction banner
Browse files Browse the repository at this point in the history
(cherry picked from commit 3abe7c7)
  • Loading branch information
sever-sever authored and mergify[bot] committed Oct 10, 2024
1 parent b68c8ce commit 52d9a2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/templates/login/motd_vyos_nonproduction.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

---
Warning: This VyOS system is not a stable long-term support version and is not intended for production use.
4 changes: 4 additions & 0 deletions src/conf_mode/system_login_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
PRELOGIN_FILE = r'/etc/issue'
PRELOGIN_NET_FILE = r'/etc/issue.net'
POSTLOGIN_FILE = r'/etc/motd'
POSTLOGIN_VYOS_FILE = r'/run/motd.d/01-vyos-nonproduction'

default_config_data = {
'issue': 'Welcome to VyOS - \\n \\l\n\n',
Expand Down Expand Up @@ -94,6 +95,9 @@ def apply(banner):
render(POSTLOGIN_FILE, 'login/default_motd.j2', banner,
permission=0o644, user='root', group='root')

render(POSTLOGIN_VYOS_FILE, 'login/motd_vyos_nonproduction.j2', banner,
permission=0o644, user='root', group='root')

return None

if __name__ == '__main__':
Expand Down

0 comments on commit 52d9a2f

Please sign in to comment.