summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrbalocca <rbalocca@fugazi.vyatta.com>2007-12-10 14:37:59 -0800
committerrbalocca <rbalocca@fugazi.vyatta.com>2007-12-10 14:37:59 -0800
commit94fbe9b07d0f556fcd2d9bcb3b7e00a1fb2df16b (patch)
tree20092705b086f88366ff72b1ea615bc77eeaf684 /scripts
parent8b00422b60deb69fa9abbfe584e69b5853c5e8af (diff)
parent5ba8cf8393030d75c03a15551a57831f3f0908a4 (diff)
downloadvyatta-cfg-quagga-94fbe9b07d0f556fcd2d9bcb3b7e00a1fb2df16b.tar.gz
vyatta-cfg-quagga-94fbe9b07d0f556fcd2d9bcb3b7e00a1fb2df16b.zip
Merge branch 'master' into glendale
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rl-system.init31
1 files changed, 28 insertions, 3 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index 8d933b2d..779a7610 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -167,6 +167,16 @@ write_iftab ()
rm -f $IFTAB
for i in ${!cfg_eth_hwid[@]} ; do
+ echo "etha$i mac ${cfg_eth_hwid[$i]}" >> $IFTAB
+ done
+}
+
+write_iftab_real ()
+{
+ local -i i
+
+ rm -f $IFTAB
+ for i in ${!cfg_eth_hwid[@]} ; do
echo "eth$i mac ${cfg_eth_hwid[$i]}" >> $IFTAB
done
}
@@ -194,7 +204,19 @@ add_bootfile_eth_hwid ()
}' $BOOTFILE
}
-update_bootfile_eth_hwid ()
+add_bootfile_eth_linkdetect ()
+{
+ local eth=$1
+
+ sed -i '/^interfaces {$/,/^}$/ {
+ /^}$/i\
+ ethernet '"$eth"' {\
+ link-detect\
+ }
+ }' $BOOTFILE
+}
+
+update_bootfile_eths ()
{
local -i i
@@ -203,6 +225,7 @@ update_bootfile_eth_hwid ()
mod_bootfile_eth_hwid eth$i ${cfg_eth_hwid[$i]}
else
add_bootfile_eth_hwid eth$i ${cfg_eth_hwid[$i]}
+ add_bootfile_eth_linkdetect eth$i
fi
done
}
@@ -234,13 +257,13 @@ itfmess ()
load_sys_vmnets
update_cfg_eth_hwid
write_iftab
- update_bootfile_eth_hwid
+ update_bootfile_eths
update_bootfile_vmnets
}
maybe_ifrename () {
if [ -e $IFTAB ] ; then
- ifrename -d -p -t
+ ifrename -d -p
fi
}
@@ -311,6 +334,8 @@ start () {
set_reboot_on_panic
itfmess
maybe_ifrename
+ write_iftab_real
+ maybe_ifrename
add_new_serial_if
reset_promiscous_arp_response
set_ip_forwarding