From 8f687e4c0756dcceef078bc747efd486a13c348f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 11 Sep 2005 00:36:52 +0000 Subject: Cleanup hacks. Only add default route if its not added already. --- sbin/dhclient-script | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sbin/dhclient-script') diff --git a/sbin/dhclient-script b/sbin/dhclient-script index 9197e46..024d805 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -143,7 +143,10 @@ add_new_routes() { fi # last ditch effort if no route exists. - $ROUTE add default -iface $interface + DEFAULTROUTE=`netstat -rn | grep default` + if [ -z "${DEFAULTROUTE}" ]; then + $ROUTE add default -iface $interface + fi } -- cgit v1.1