diff options
author | Mike Baker <mbm@openwrt.org> | 2004-03-28 04:15:26 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2004-03-28 04:15:26 +0000 |
commit | 6d77d33472d3fd60102e782ed0932dfac06f149d (patch) | |
tree | b4cd244269b4f9052d9d04940ec3effac1b058f3 /root/etc | |
parent | dbae9283459a5ff1b20316ead67452038982293a (diff) | |
download | mtk-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-x | root/etc/networking.sh | 9 |
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 |