]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix a bug that would cause problems if the server provides a new
authorMurray <source@isc.org>
Sun, 9 Jun 2002 22:35:00 +0000 (22:35 +0000)
committerMurray <source@isc.org>
Sun, 9 Jun 2002 22:35:00 +0000 (22:35 +0000)
domain name server, but not the actual domain.

Submitted by: sanpei@sanpei.org (MIHIRA Sanpei Yoshiro)
RT #: 3038

client/scripts/freebsd

index 652d0d0683d64c9b2a5ca3ccd76a34995782fcbd..619373217bc3dfeb0c63196edc0d9cec328a41c2 100755 (executable)
@@ -7,8 +7,12 @@ else
 fi
 
 make_resolv_conf() {
-  if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
-    echo search $new_domain_name >/etc/resolv.conf
+  if [ x"$new_domain_name_servers" != x ]; then
+    if [ "x$new_domain_name" != x ]; then
+      echo search $new_domain_name >/etc/resolv.conf
+    else
+      rm /etc/resolv.conf
+    fi
     for nameserver in $new_domain_name_servers; do
       echo nameserver $nameserver >>/etc/resolv.conf
     done