diff options
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | debian/vyatta-cfg-system.postinst.in | 30 | ||||
-rw-r--r-- | scripts/check-params-on-reboot.d/README | 6 |
3 files changed, 39 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 0fabe989..23bdc3a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,9 @@ sysconf_DATA = initd_SCRIPTS = checkparamsonreboot_SCRIPTS = +checkparamsonreboot_DATA = +checkparamsonreboot_DATA += scripts/check-params-on-reboot.d/README + initd_SCRIPTS += etc/init.d/vyatta-config-reboot-params checkparamsonreboot_SCRIPTS += scripts/check-params-on-reboot.d/ipv6_disable_blacklist diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index a443b891..7daa9935 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -171,6 +171,36 @@ mkdir -p /opt/vyatta/etc/config/auth mkdir -p /opt/vyatta/etc/config/scripts mkdir -p /opt/vyatta/etc/config/user-data +# create /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script +# this should be after 'mkdir -p /opt/vyatta/etc/config/scripts' above +if [ ! -x /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script ]; then + touch /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script + chmod 755 /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script + cat <<EOF >>/opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script +#!/bin/sh +# This script is called from /etc/rc.local on boot after the Vyatta +# configuration is fully applied. Any modifications done to work around +# unfixed bugs and implement enhancements which are not complete in the Vyatta +# system can be placed here. +EOF +fi + +# call vyatta-postconfig-bootup.script from /etc/rc.local +if ! grep -q /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script \ + /etc/rc.local +then + cat <<EOF >>/etc/rc.local +# Do not remove the following call to vyatta-postconfig-bootup.script. +# Any boot time workarounds should be put in script below so that they +# get preserved for the new image during image upgrade. +/opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script +EOF + sh -c "sed -i -e '/exit 0/d' /etc/rc.local" + cat <<EOF >>/etc/rc.local +exit 0 +EOF +fi + touch /etc/environment if [ ! -f /etc/bash_completion ]; then diff --git a/scripts/check-params-on-reboot.d/README b/scripts/check-params-on-reboot.d/README new file mode 100644 index 00000000..d54ec338 --- /dev/null +++ b/scripts/check-params-on-reboot.d/README @@ -0,0 +1,6 @@ +# /etc/init.d/vyatta-config-reboot-params script executes scripts placed in +# this directory when system boots during 'runlevel S'. Scripts placed in this +# directory are responsible for making sure that the underlying system value of +# config parameters which require a reboot match when the system boots. All +# scripts placed in this directory are passed the configuration boot file as +# an argument. More info in /etc/init.d/vyatta-config-reboot-params |