X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/275d53e4fe05033657a9639b8dfe1504decfce61..841e5a0f16d54f9548f83f30c8b4efd736a3af12:/package/base-files/default/usr/share/udhcpc/default.script diff --git a/package/base-files/default/usr/share/udhcpc/default.script b/package/base-files/default/usr/share/udhcpc/default.script index cef2c2ed2..42d3eaf0c 100755 --- a/package/base-files/default/usr/share/udhcpc/default.script +++ b/package/base-files/default/usr/share/udhcpc/default.script @@ -28,8 +28,9 @@ case "$1" in 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 ; do :; done + while route del default gw 0.0.0.0 dev $interface 2>&- ; do + echo "removing old default route" + done for i in $router ; do route add default gw $i dev $interface done