From owner-freebsd-current@FreeBSD.ORG Thu Oct 28 19:13:28 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 3A97016A4CE for ; Thu, 28 Oct 2004 19:13:28 +0000 (GMT) Received: from mailhub01.unibe.ch (mailhub01.unibe.ch [130.92.9.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BE5243D6E for ; Thu, 28 Oct 2004 19:13:27 +0000 (GMT) (envelope-from roth@speedy.unibe.ch) Received: from localhost (scanhub03-eth0.unibe.ch [130.92.254.67]) by mailhub01.unibe.ch (Postfix) with ESMTP id D6C1225BB22; Thu, 28 Oct 2004 21:13:25 +0200 (MEST) Received: from mailhub01.unibe.ch ([130.92.9.52]) by localhost (scanhub03.unibe.ch [130.92.254.67]) (amavisd-new, port 10024) with LMTP id 06773-16-21; Thu, 28 Oct 2004 21:13:20 +0200 (CEST) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub01.unibe.ch (Postfix) with ESMTP id 2185E25BB43; Thu, 28 Oct 2004 21:13:25 +0200 (MEST) Received: from speedy.unibe.ch (speedy [130.92.64.35]) by asterix.unibe.ch (8.11.7p1+Sun/8.11.7) with ESMTP id i9SJDO124898; Thu, 28 Oct 2004 21:13:24 +0200 (MET DST) Received: (from roth@localhost) by speedy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id i9SJDOSN018928; Thu, 28 Oct 2004 21:13:24 +0200 (MEST) Date: Thu, 28 Oct 2004 21:13:24 +0200 From: Tobias Roth To: Oliver Lehmann Message-ID: <20041028191324.GA18914@speedy.unibe.ch> References: <20041027224512.2e3b2ae8.lehmann@ans-netz.de> <20041027204852.GY95878@horsey.gshapiro.net> <20041027230039.7a5d0150.lehmann@ans-netz.de> <20041027210303.GZ95878@horsey.gshapiro.net> <20041027233309.122e4207.lehmann@ans-netz.de> <20041027214224.GA60882@dragon.nuxi.com> <20041028002251.73eae308.lehmann@ans-netz.de> <20041028174751.37d14505.lehmann@ans-netz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028174751.37d14505.lehmann@ans-netz.de> User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne 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 19:13:28 -0000 On Thu, Oct 28, 2004 at 05:47:51PM +0200, Oliver Lehmann wrote: > Oliver Lehmann wrote: > > > I've tried supersede domain-name-servers ""; in /etc/dhclient.conf, But > > that seems to have no effect. I can't see any other way to prevent > > dhclient from touching my resolv.conf in that man page. Maybe you can > > point me? > > > > man 8 dhclient-script says > > > > HOOKS > > When it starts, the client script first defines a shell > > function, make_resolv_conf , which is later used to create the > > /etc/resolv.conf file. To override the default behaviour, > > redefine this function in the enter hook script. > > > > Martin, > > do you think, it is a good solution to overwrite the function definition > to prevent overwriting your resolv.conf? Wouldn't be a rc.conf parameter > easier for beginners to "get", and more stringent to the whole system of > configuration? > What do others think? I think not. If dhclient (or any other daemon started from within rc.d/) doesn't make it possible to prevent overwriting of resolv.conf by means of command line arguments, then rc.conf is not the place to fix that. You cannot have rc.conf knobs for every option of every daemon in the base system, that's what the daemons config files are for. cheers, t.