From b95709587c7e34d1312c0563a76461cd625156d3 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Tue, 24 Feb 2009 18:36:18 -0800 Subject: set default values for ipv6 accept_redirects and accept_source_route --- scripts/rl-system.init | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'scripts') 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 -- cgit v1.2.3