From: Murray Date: Sun, 9 Jun 2002 22:35:00 +0000 (+0000) Subject: Fix a bug that would cause problems if the server provides a new X-Git-Tag: HEAD-MERGE-V3-0-3B1~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d5e25bc07daa7c60a5358c33717ebe47cfd21b7;p=thirdparty%2Fdhcp.git Fix a bug that would cause problems if the server provides a new domain name server, but not the actual domain. Submitted by: sanpei@sanpei.org (MIHIRA Sanpei Yoshiro) RT #: 3038 --- diff --git a/client/scripts/freebsd b/client/scripts/freebsd index 652d0d068..619373217 100755 --- a/client/scripts/freebsd +++ b/client/scripts/freebsd @@ -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