summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-04-01 16:05:52 +0200
committerGitHub <noreply@github.com>2025-04-01 16:05:52 +0200
commit2c1e0b5c73746bd6ca71b006e79f842ec27e9044 (patch)
tree41949cf172e57b219437abf52ceca9494b6c71bd /src
parente882b3d424652f1090936c9bf5afd83d1b8e483c (diff)
parent251eb5c5d7dab67c193100ba0dcfd7fef604f16b (diff)
downloadvyos-1x-2c1e0b5c73746bd6ca71b006e79f842ec27e9044.tar.gz
vyos-1x-2c1e0b5c73746bd6ca71b006e79f842ec27e9044.zip
Merge pull request #4428 from dmbaturin/T7159-conditional-nonproduction-banner
login: T7159: limit the "not a production version" to dev builds
Diffstat (limited to 'src')
-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