summaryrefslogtreecommitdiff
path: root/scripts/rl-system.init
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.(none)>2007-12-05 12:38:40 -0800
committerRobert Bays <rbays@moresby.(none)>2007-12-05 12:38:40 -0800
commitbfaa4cb6f05b86f7d4d18e0ccab6e49c02d3d52d (patch)
treede0a3235df8275a3f1e5aa3cfddde20b18017cf4 /scripts/rl-system.init
parenta42b9776af35929a1de00940fdf24337b028230e (diff)
downloadvyatta-cfg-quagga-bfaa4cb6f05b86f7d4d18e0ccab6e49c02d3d52d.tar.gz
vyatta-cfg-quagga-bfaa4cb6f05b86f7d4d18e0ccab6e49c02d3d52d.zip
add link-detect to interfaces by default on interface discovery
Diffstat (limited to 'scripts/rl-system.init')
-rwxr-xr-xscripts/rl-system.init17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index 8d933b2d..82451b60 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -194,7 +194,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 +215,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,7 +247,7 @@ itfmess ()
load_sys_vmnets
update_cfg_eth_hwid
write_iftab
- update_bootfile_eth_hwid
+ update_bootfile_eths
update_bootfile_vmnets
}