aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-05-13 21:58:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-05-13 21:58:08 +0000
commit3e9c0379baf15da212662b933e81a7ce63f4a5f1 (patch)
tree3fc936686348948ca7c4602436f6f791aab5e367 /package
parent610421f87aef19547ebb68d5d89ccb6f43480a7d (diff)
downloadupstream-3e9c0379baf15da212662b933e81a7ce63f4a5f1.tar.gz
upstream-3e9c0379baf15da212662b933e81a7ce63f4a5f1.tar.bz2
upstream-3e9c0379baf15da212662b933e81a7ce63f4a5f1.zip
Do not suppress routes if the router received on renew is the same (#138)
SVN-Revision: 7215
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/usr/share/udhcpc/default.script2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script
index c723953566..f2099204e3 100755
--- a/package/base-files/files/usr/share/udhcpc/default.script
+++ b/package/base-files/files/usr/share/udhcpc/default.script
@@ -28,7 +28,7 @@ case "$1" in
netmask ${subnet:-255.255.255.0} \
broadcast ${broadcast:-+}
- if [ -n "$router" ] ; then
+ if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then
echo "deleting routers"
while route del default gw 0.0.0.0 dev $interface >&- 2>&- ; do :; done