diff options
Diffstat (limited to 'client/scripts/netbsd')
-rwxr-xr-x | client/scripts/netbsd | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/client/scripts/netbsd b/client/scripts/netbsd index f61d0e78..d226cdff 100755 --- a/client/scripts/netbsd +++ b/client/scripts/netbsd @@ -1,10 +1,12 @@ #!/bin/sh make_resolv_conf() { - echo search $new_domain_name >/etc/resolv.conf - for nameserver in $new_domain_name_servers; do - echo nameserver $nameserver >>/etc/resolv.conf - done + if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then + echo search $new_domain_name >/etc/resolv.conf + for nameserver in $new_domain_name_servers; do + echo nameserver $nameserver >>/etc/resolv.conf + done + fi } # Must be used on exit. Invokes the local dhcp client exit hooks, if any. @@ -127,7 +129,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ exit_with_hooks 0 fi -if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then +if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \ + || [ x$reason = xSTOP ]; then if [ x$alias_ip_address != x ]; then ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1 route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 |