From owner-freebsd-current@FreeBSD.ORG Thu Oct 28 06:25:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD6F916A4CE for ; Thu, 28 Oct 2004 06:25:07 +0000 (GMT) Received: from sasami.jurai.net (sasami.jurai.net [69.17.104.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37D8243D45 for ; Thu, 28 Oct 2004 06:25:07 +0000 (GMT) (envelope-from mdodd@FreeBSD.ORG) Received: from sasami.jurai.net (winter@sasami.jurai.net [69.17.104.113]) by sasami.jurai.net (8.13.1/8.13.1) with ESMTP id i9S6P1mo060906; Thu, 28 Oct 2004 02:25:04 -0400 (EDT) (envelope-from mdodd@FreeBSD.ORG) Date: Thu, 28 Oct 2004 02:25:01 -0400 (EDT) From: "Matthew N. Dodd" X-X-Sender: winter@sasami.jurai.net To: Oliver Lehmann In-Reply-To: <20041028071001.44ad2f43.lehmann@ans-netz.de> Message-ID: <20041028021918.J33456@sasami.jurai.net> References: <20041027224512.2e3b2ae8.lehmann@ans-netz.de> <20041027230039.7a5d0150.lehmann@ans-netz.de> <20041027233309.122e4207.lehmann@ans-netz.de> <20041028002251.73eae308.lehmann@ans-netz.de> <20041028071001.44ad2f43.lehmann@ans-netz.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (sasami.jurai.net [69.17.104.113]); Thu, 28 Oct 2004 02:25:04 -0400 (EDT) cc: freebsd-current@FreeBSD.ORG Subject: Re: dhclient trashes my resolv.conf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 06:25:07 -0000 On Thu, 28 Oct 2004, Oliver Lehmann wrote: > Problem is, I have "options" in my resolv.conf which will be still lost > then. I'm using something like the following (actually what I'm using regenerates named.conf and reloads the nameserver but we won't go into that). Index: dhclient-script.sh =================================================================== RCS file: /home/cvs/ncvs/src/sbin/dhclient/dhclient-script.sh,v retrieving revision 1.2 diff -u -u -r1.2 dhclient-script.sh --- dhclient-script.sh 1 Feb 2002 18:46:58 -0000 1.2 +++ dhclient-script.sh 18 Sep 2003 02:31:51 -0000 @@ -83,7 +83,8 @@ ############################################################################# make_resolv_conf () { - if [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then + if [ ! -f /etc/dhclient-no-resolv-conf ] && + [ "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 -- 10 40 80 C0 00 FF FF FF FF C0 00 00 00 00 10 AA AA 03 00 00 00 08 00