aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2004-03-28 04:15:26 +0000
committerMike Baker <mbm@openwrt.org>2004-03-28 04:15:26 +0000
commit9c22a8ee5f4091905262a2a43e1dc55e1060f912 (patch)
treeb4cd244269b4f9052d9d04940ec3effac1b058f3
parente83346499d251732f6a996782dac46976cc5e341 (diff)
downloadupstream-9c22a8ee5f4091905262a2a43e1dc55e1060f912.tar.gz
upstream-9c22a8ee5f4091905262a2a43e1dc55e1060f912.tar.bz2
upstream-9c22a8ee5f4091905262a2a43e1dc55e1060f912.zip
deal with static routes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xroot/etc/networking.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/root/etc/networking.sh b/root/etc/networking.sh
index b857a86c062..c1e6742e363 100755
--- a/root/etc/networking.sh
+++ b/root/etc/networking.sh
@@ -161,3 +161,12 @@ lan_proto="static"
configure lan
configure wifi
configure wan
+
+for route in $(nvram_get static_route); do {
+ ip=${route%%:*} route=${route#*:}
+ netmask=${route%%:*} route=${route#*:}
+ gateway=${route%%:*} route=${route#*:}
+ metric=${route%%:*} route=${route#*:}
+ if=${route%%:*}
+ $DEBUG route add -net $ip netmask $netmask gw $gateway metric $metric dev $if
+} done