From: Florian Fainelli Date: Sun, 13 May 2007 21:58:08 +0000 (+0000) Subject: Do not suppress routes if the router received on renew is the same (#138) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e9c0379baf15da212662b933e81a7ce63f4a5f1;p=librecmc%2Flibrecmc.git Do not suppress routes if the router received on renew is the same (#138) SVN-Revision: 7215 --- 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