Do not suppress routes if the router received on renew is the same (#138)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7215 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Florian Fainelli 2007-05-13 21:58:08 +00:00
parent ec138625b6
commit 41bff969b5
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ case "$1" in
netmask ${subnet:-255.255.255.0} \ netmask ${subnet:-255.255.255.0} \
broadcast ${broadcast:-+} broadcast ${broadcast:-+}
if [ -n "$router" ] ; then if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then
echo "deleting routers" echo "deleting routers"
while route del default gw 0.0.0.0 dev $interface >&- 2>&- ; do :; done while route del default gw 0.0.0.0 dev $interface >&- 2>&- ; do :; done