From d1b74e3ed68ae608a11ba22f15466f5a3c323e31 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 19 Mar 2020 19:57:29 +0100 Subject: banner: T2135: add missing \n in login banner --- src/conf_mode/system-login-banner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/conf_mode/system-login-banner.py') diff --git a/src/conf_mode/system-login-banner.py b/src/conf_mode/system-login-banner.py index 20cc16f97..5a34a0b06 100755 --- a/src/conf_mode/system-login-banner.py +++ b/src/conf_mode/system-login-banner.py @@ -25,6 +25,7 @@ individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. + """ PRELOGIN_FILE = r'/etc/issue' @@ -32,8 +33,8 @@ PRELOGIN_NET_FILE = r'/etc/issue.net' POSTLOGIN_FILE = r'/etc/motd' default_config_data = { - 'issue': 'Welcome to VyOS - \n \l', - 'issue_net': 'Welcome to VyOS', + 'issue': 'Welcome to VyOS - \n \l\n', + 'issue_net': 'Welcome to VyOS\n', 'motd': motd } @@ -54,6 +55,8 @@ def get_config(): if tmp: tmp = tmp.replace('\\n','\n') tmp = tmp.replace('\\t','\t') + # always add newline character + tmp += '\n' else: tmp = '' @@ -66,6 +69,8 @@ def get_config(): if tmp: tmp = tmp.replace('\\n','\n') tmp = tmp.replace('\\t','\t') + # always add newline character + tmp += '\n' else: tmp = '' -- cgit v1.2.3