summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rl-system.init22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index 5a042c73..a568bfa7 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -134,6 +134,27 @@ create_ssh_host_keys () {
fi;
}
+set_ipv6_params ()
+{
+ # default values for ipv6 parameters do not take effect for interfaces at boot
+ # time, so copy over default values to their interface specific parameter
+ ipv6_params=(accept_source_route accept_redirects)
+ num_ipv6_params=${#ipv6_params[*]}
+ i=0
+ while [ $i -lt $num_ipv6_params ]; do
+ default_val=`cat /proc/sys/net/ipv6/conf/default/${ipv6_params[$i]}`
+ array=(`ls /proc/sys/net/ipv6/conf/`)
+ array_len=${#array[*]}
+ j=0
+ while [ $j -lt $array_len ]; do
+ sudo sh -c "echo $default_val > \
+ /proc/sys/net/ipv6/conf/${array[$j]}/${ipv6_params[$i]}"
+ let j++
+ done
+ let i++
+ done
+}
+
start () {
udev_rescan
create_ssh_host_keys || \
@@ -144,6 +165,7 @@ start () {
log_failure_msg "can\'t add serial interfaces"
sysctl -q -p /opt/vyatta/etc/vyatta-sysctl.conf ||
log_failure_msg "can\'t configure kernel settings"
+ set_ipv6_params
update_version_info
## Clear out apt config file--it will be filled in by rtrmgr