diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-04 19:52:13 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-04-04 19:52:13 +0200 |
commit | 39e212b47393885e9c98fc7356c4389f22d74d46 (patch) | |
tree | ce09f435ac1f711d5b2abf4f9768dedb3426d946 /scripts | |
parent | ff9fb27136f85888a347f40a430506992240166c (diff) | |
download | vyatta-cfg-39e212b47393885e9c98fc7356c4389f22d74d46.tar.gz vyatta-cfg-39e212b47393885e9c98fc7356c4389f22d74d46.zip |
lsb: always restore the default issue banner on boot
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/init/vyos-router | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router index ccb9c91..b9dc00c 100755 --- a/scripts/init/vyos-router +++ b/scripts/init/vyos-router @@ -225,6 +225,15 @@ security_reset () rm -f /etc/ppp/peers/pppoe* /etc/ppp/peers/wlm* } +# As VyOS does not execute commands that are not present in the CLI we need this +# workaround to reset the issue / motd files on boot to a sane default, probably +# the same default as listed in the python script. +issue_reset () +{ + echo -e "Welcome to VyOS - \\\n \\\l\n" > /etc/issue + echo -e "Welcome to VyOS\n" > /etc/issue.net +} + start () { # some legacy directories migrated over from old rl-system.init @@ -270,9 +279,10 @@ start () /usr/lib/frr/frrinit.sh start # reset and clean config files - security_reset + security_reset || log_failure_msg "security reset failed" + issue_reset || log_failure_msg "could not reset motd and issue files" - clear_or_override_config_files || log_failure_msg "can\'t reset config files" + clear_or_override_config_files || log_failure_msg "could not reset config files" log_action_begin_msg "Mounting VyOS Config" # ensure the vyatta_configdir supports a large number of inodes since |