summaryrefslogtreecommitdiff
path: root/scripts/rl-system.init
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-01-19 16:47:21 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-01-19 17:00:30 -0800
commit6eb5483bb5bba3cb4efcc8d306724840c80ccb33 (patch)
tree5b7de62d67772fa94c65f4e4af51eeca38ed8af3 /scripts/rl-system.init
parent153a88d6cee7ae03a36b8b121dbac523bce0acdd (diff)
downloadvyatta-cfg-system-6eb5483bb5bba3cb4efcc8d306724840c80ccb33.tar.gz
vyatta-cfg-system-6eb5483bb5bba3cb4efcc8d306724840c80ccb33.zip
Change how IPV4/IPV6 configuration values are done
1. Move vyatta-sysctl.conf from rl-system.init to procps This makes configuration happen early (before networking) 2. Do IPV6 configuration for address_flush in rl-system.init (after IPV6 is loaded) 3. Cleanup shell code for ipv6_params: * no sudo needed in startup scripts * use cleaner iteration
Diffstat (limited to 'scripts/rl-system.init')
-rwxr-xr-xscripts/rl-system.init30
1 files changed, 10 insertions, 20 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index ee113ff6..d37e651c 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -137,29 +137,19 @@ create_ssh_host_keys () {
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
-
+ # diffcult to set new default values for IPV6 earlier
if [ ! -d /proc/sys/net/ipv6 ]; then
# Skip it if IPv6 is not loaded
return
fi
- 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++
+ # These values all should be disabled
+ for p in accept_source_route accept_redirects address_flush
+ do
+ for d in /proc/sys/net/ipv6/conf/*
+ do
+ echo 0 > $d/$p
+ done
done
}
@@ -188,10 +178,10 @@ start () {
setup_ntp_config_file
add_new_serial_if || \
log_failure_msg "can\'t add serial interfaces"
- sysctl -q -e -p /opt/vyatta/etc/vyatta-sysctl.conf ||
- log_failure_msg "can\'t configure kernel settings"
+
set_ipv6_params
pam_reset
+
update_version_info
## Clear out apt config file--it will be filled in by rtrmgr