summaryrefslogtreecommitdiff
path: root/root/etc
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
commit6d77d33472d3fd60102e782ed0932dfac06f149d (patch)
treeb4cd244269b4f9052d9d04940ec3effac1b058f3 /root/etc
parentdbae9283459a5ff1b20316ead67452038982293a (diff)
downloadmtk-20170518-6d77d33472d3fd60102e782ed0932dfac06f149d.zip
mtk-20170518-6d77d33472d3fd60102e782ed0932dfac06f149d.tar.gz
mtk-20170518-6d77d33472d3fd60102e782ed0932dfac06f149d.tar.bz2
deal with static routes
SVN-Revision: 8
Diffstat (limited to 'root/etc')
-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 b857a86..c1e6742 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