summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-10-10 09:56:20 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-10-10 09:56:20 +0000
commit3abe7c72c95c3d9b825db08b092c555786e9fbcf (patch)
tree7e56c9a0274d5fc1f7c7d4c5bda7030677d6d550
parentbb2fa1da6aac5786976614136ec34dfb0854eee4 (diff)
downloadvyos-1x-3abe7c72c95c3d9b825db08b092c555786e9fbcf.tar.gz
vyos-1x-3abe7c72c95c3d9b825db08b092c555786e9fbcf.zip
T6712: Add nonproduction banner
-rw-r--r--data/templates/login/motd_vyos_nonproduction.j23
-rwxr-xr-xsrc/conf_mode/system_login_banner.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/data/templates/login/motd_vyos_nonproduction.j2 b/data/templates/login/motd_vyos_nonproduction.j2
new file mode 100644
index 000000000..32922f27f
--- /dev/null
+++ b/data/templates/login/motd_vyos_nonproduction.j2
@@ -0,0 +1,3 @@
+
+---
+Warning: This VyOS system is not a stable long-term support version and is not intended for production use.
diff --git a/src/conf_mode/system_login_banner.py b/src/conf_mode/system_login_banner.py
index 923e1bf57..5826d8042 100755
--- a/src/conf_mode/system_login_banner.py
+++ b/src/conf_mode/system_login_banner.py
@@ -28,6 +28,7 @@ airbag.enable()
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',
@@ -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__':