summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient-script
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-11 00:36:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-11 00:36:52 +0000
commit8f687e4c0756dcceef078bc747efd486a13c348f (patch)
tree2e6102fd7573d0418e5c6fe510ba7e084ad32802 /sbin/dhclient-script
parent973dbc364f48c0bed051350fab99f222ba235108 (diff)
downloadpfsense-8f687e4c0756dcceef078bc747efd486a13c348f.zip
pfsense-8f687e4c0756dcceef078bc747efd486a13c348f.tar.gz
Cleanup hacks. Only add default route if its not added already.
Diffstat (limited to 'sbin/dhclient-script')
-rwxr-xr-xsbin/dhclient-script5
1 files changed, 4 insertions, 1 deletions
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
}
OpenPOWER on IntegriCloud