diff options
author | Mohit Mehta <mohit@vyatta.com> | 2011-04-18 18:00:48 -0700 |
---|---|---|
committer | Mohit Mehta <mohit@vyatta.com> | 2011-04-18 18:00:48 -0700 |
commit | 4d5862053ef2f99d09507b2e9b702aca1229099a (patch) | |
tree | a3be28fccf256210728f675c0f366fdfc6eebcfa /scripts | |
parent | 2b7d3fef5077dbc28e39ddb6a267fe6ddeb5813b (diff) | |
download | vyatta-cfg-system-4d5862053ef2f99d09507b2e9b702aca1229099a.tar.gz vyatta-cfg-system-4d5862053ef2f99d09507b2e9b702aca1229099a.zip |
* run start-up script vyatta-config-reboot-params very early in boot process
This script executes scripts lying in the following directory:
/opt/vyatta/bin/sudo-users/check-params-on-reboot.d
Scripts in check-params-on-reboot.d are intended for parameters
that require a reboot to take effect after they are set/changed.
Because of the reboot requirement, underlying value and related
config paramter value can become out-of-sync in couple of cases:
1. change parameter value, don't save config, reboot. Underlying
value is different than the value in config file.
2. install new image; when new image boots, underlying value is
the default Vyatta shipped value not the value in config file.
More info: http://bugzilla.vyatta.com/show_bug.cgi?id=6915#c1
This check-in also adds ipv6_disable_blacklist script in
check-params-on-reboot.d to fix the above mentioned problem
for 'system ipv6 disable' and 'system ipv6 blacklist'
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-params-on-reboot.d/ipv6_disable_blacklist | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/check-params-on-reboot.d/ipv6_disable_blacklist b/scripts/check-params-on-reboot.d/ipv6_disable_blacklist new file mode 100755 index 00000000..2fcb762a --- /dev/null +++ b/scripts/check-params-on-reboot.d/ipv6_disable_blacklist @@ -0,0 +1,24 @@ +#!/bin/sh +# +# fix IPv6 disable/blacklist on reboot +# + +BOOTFILE=$1 + +cli-shell-api cfExists $BOOTFILE system ipv6 disable +ipv6_disable_cfg=`echo $?` +if [ "$ipv6_disable_cfg" == "0" ]; then + sudo sh -c "echo options ipv6 disable_ipv6=1 > \ + /etc/modprobe.d/vyatta_disable_ipv6.conf" +else + sudo sh -c "rm -f /etc/modprobe.d/vyatta_disable_ipv6.conf" +fi + +cli-shell-api cfExists $BOOTFILE system ipv6 blacklist +ipv6_blacklist_cfg=`echo $?` +if [ "$ipv6_blacklist_cfg" == "0" ]; then + sudo sh -c "echo blacklist ipv6 > \ + /etc/modprobe.d/vyatta_blacklist_ipv6.conf" +else + sudo sh -c "rm -f /etc/modprobe.d/vyatta_blacklist_ipv6.conf" +fi |