summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/dhcp/dhclient/scripts/dhclient-script12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/dhcp/dhclient/scripts/dhclient-script b/usr.sbin/dhcp/dhclient/scripts/dhclient-script
index 77fdc5c9f26..c2e289422b3 100644
--- a/usr.sbin/dhcp/dhclient/scripts/dhclient-script
+++ b/usr.sbin/dhcp/dhclient/scripts/dhclient-script
@@ -140,11 +140,13 @@ if [ x$reason = xTIMEOUT ]; then
for router in $new_routers; do
route add default $router >/dev/null 2>&1
done
- set $new_static_routes
- while [ $# -gt 1 ]; do
- route add $0 $1
- shift; shift
- done
+ if [ "$new_static_routes" != "" ]; then
+ set $new_static_routes
+ while [ $# -gt 1 ]; do
+ route add $1 $2
+ shift; shift
+ done
+ fi
echo search $new_domain_name >/etc/resolv.conf.std
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf.std