summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/init/vyos-router37
1 files changed, 14 insertions, 23 deletions
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 <tgrennan@vyatta.com>
-# **** End License ****
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
. /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"