From c239892750dd64ceccb489a2057c1aaf78acb15e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 26 Jun 2021 23:04:27 +0200 Subject: Reset ctrl-alt-delete setting using the vyos-1x provided python handler --- scripts/init/vyos-router | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'scripts') diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router index 3c2ae1b..9225c1f 100755 --- a/scripts/init/vyos-router +++ b/scripts/init/vyos-router @@ -1,23 +1,17 @@ #!/bin/bash -# **** License **** +# Copyright (C) 2021 VyOS maintainers and contributors +# # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as +# it under the terms of the GNU General Public License version 2 or later as # published by the Free Software Foundation. # -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# A copy of the GNU General Public License is available as -# `/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution -# or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. -# You can also obtain it by writing to the Free Software Foundation, -# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1301, USA. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# Author: Tom Grennan -# **** End License **** +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . . /lib/lsb/init-functions @@ -231,13 +225,6 @@ security_reset () rm -rf /etc/ipsec.conf /etc/ipsec.secrets /etc/swanctl } -# As VyOS does not execute commands that are not present in the CLI we call -# the script by hand to have a single source for the login banner and MOTD -issue_reset () -{ - ${vyos_conf_scripts_dir}/system-login-banner.py -} - start () { # some legacy directories migrated over from old rl-system.init @@ -290,7 +277,11 @@ start () # reset and clean config files security_reset || log_failure_msg "security reset failed" - issue_reset || log_failure_msg "could not reset motd and issue files" + + # As VyOS does not execute commands that are not present in the CLI we call + # the script by hand to have a single source for the login banner and MOTD + ${vyos_conf_scripts_dir}/system-login-banner.py || log_failure_msg "could not reset motd and issue files" + ${vyos_conf_scripts_dir}/system-option.py || log_failure_msg "could not reset system option files" clear_or_override_config_files || log_failure_msg "could not reset config files" -- cgit v1.2.3