Skip to content

Commit

Permalink
T6712: Add nonproduction banner (#4149)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3abe7c7)

Co-authored-by: Viacheslav Hletenko <[email protected]>
  • Loading branch information
mergify[bot] and sever-sever authored Oct 11, 2024
1 parent b68c8ce commit e5d2ac5
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 e5d2ac5

Please sign in to comment.