Date: Tue, 27 Apr 1999 16:30:51 -0700 (PDT) From: Bill Fenner <fenner@research.att.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/11360: Allow specification of "search" in resolv.conf when using dhclient Message-ID: <199904272330.QAA08003@mango.attlabs.att.com>
next in thread | raw e-mail | index | archive | help
>Number: 11360 >Category: bin >Synopsis: Allow specification of "search" in resolv.conf when using dhclient >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 27 16:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Bill Fenner >Release: FreeBSD 3.1-STABLE i386 >Organization: AT&T >Environment: isc-dhcp from contrib >Description: The /sbin/dhclient-script shell script always recreates /etc/resolv.conf from scratch, containing a limited "search" line which only includes the domain returned by the DHCP server. Some people like to use "search" to search multiple domains. My suggestion is that if the file /etc/search.<domain name> exists, use it as the search line - example: /etc/search.research.att.com contains search research.att.com otherdomain.att.com att.com freebsd.org and /etc/search.ourhouse.net contains search ourhouse.net freebsd.org >How-To-Repeat: Run dhclient and examine /etc/resolv.conf >Fix: cvs diff: Diffing . Index: freebsd =================================================================== RCS file: /home/ncvs/src/contrib/isc-dhcp/client/scripts/freebsd,v retrieving revision 1.1.1.2.2.2 diff -u -r1.1.1.2.2.2 freebsd --- freebsd 1999/03/30 21:22:25 1.1.1.2.2.2 +++ freebsd 1999/04/19 23:52:33 @@ -85,7 +85,12 @@ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg route add $alias_ip_address 127.0.0.1 fi - echo search $new_domain_name >/etc/resolv.conf + if [ -e /etc/search.$new_domain_name ]; + then + cp /etc/search.$new_domain_name /etc/resolv.conf + else + echo search $new_domain_name >/etc/resolv.conf + fi for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf done >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904272330.QAA08003>