diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-19 07:19:00 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-19 07:19:00 +0000 |
commit | 3f0c50c67e518434ee4e95098d557d1ae3af8823 (patch) | |
tree | 8b07f800e01c5257b78c6066f7d8788324a6d3d5 | |
parent | 16f8827b2fdc6e0cc005ffbe80a8dca723a852e9 (diff) |
Fix the TIMEOUT case not to dump the shell environment.
-rw-r--r-- | usr.sbin/dhcp/dhclient/scripts/dhclient-script | 12 |
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 |