summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2025-03-31 18:50:36 +0100
committerDaniil Baturin <daniil@baturin.org>2025-03-31 18:50:36 +0100
commit251eb5c5d7dab67c193100ba0dcfd7fef604f16b (patch)
treeb6caab103d3db684f7de9311252cf191efeb6d57
parent79b357a4afc661a9f9e6ee618ac0ac7ef2a4b20f (diff)
downloadvyos-1x-251eb5c5d7dab67c193100ba0dcfd7fef604f16b.tar.gz
vyos-1x-251eb5c5d7dab67c193100ba0dcfd7fef604f16b.zip
login: T7159: limit the "not a production version" to dev builds
(as in, display it only if the build_type version data field is not "release")
-rwxr-xr-xsrc/conf_mode/system_login_banner.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conf_mode/system_login_banner.py b/src/conf_mode/system_login_banner.py
index 5826d8042..cdd066649 100755
--- a/src/conf_mode/system_login_banner.py
+++ b/src/conf_mode/system_login_banner.py
@@ -95,8 +95,12 @@ 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')
+ if banner['version_data']['build_type'] != 'release':
+ render(POSTLOGIN_VYOS_FILE, 'login/motd_vyos_nonproduction.j2',
+ banner,
+ permission=0o644,
+ user='root',
+ group='root')
return None