From 251eb5c5d7dab67c193100ba0dcfd7fef604f16b Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 31 Mar 2025 18:50:36 +0100 Subject: 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") --- src/conf_mode/system_login_banner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3