From owner-freebsd-current@FreeBSD.ORG Thu Oct 28 16:57:12 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 39B3116A4CF; Thu, 28 Oct 2004 16:57:12 +0000 (GMT) Received: from CPE000103d44c07-CM000f9f7ae88c.cpe.net.cable.rogers.com (CPE000103d44c07-CM000f9f7ae88c.cpe.net.cable.rogers.com [69.193.222.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4C1C43D1D; Thu, 28 Oct 2004 16:57:11 +0000 (GMT) (envelope-from mikej@rogers.com) Received: from cpe000103d44c07-cm000f9f7ae88c.cpe.net.cable.rogers.com (localhost [127.0.0.1])with ESMTP id C65F72955FD; Thu, 28 Oct 2004 12:56:58 -0400 (EDT) Received: from 207.219.213.163 (proxying for unknown) (SquirrelMail authenticated user mikej); by cpe000103d44c07-cm000f9f7ae88c.cpe.net.cable.rogers.com with HTTP; Thu, 28 Oct 2004 12:56:58 -0400 (EDT) Message-ID: <18669.207.219.213.163.1098982618.squirrel@207.219.213.163> In-Reply-To: <20041028174751.37d14505.lehmann@ans-netz.de> 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> Date: Thu, 28 Oct 2004 12:56:58 -0400 (EDT) From: "Mike Jakubik" To: "Oliver Lehmann" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-wettoast-MailScanner-Information: Please contact the ISP for more information X-wettoast-MailScanner: Found to be clean X-MailScanner-From: mikej@rogers.com cc: mbr@freebsd.org 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 16:57:12 -0000 Oliver Lehmann said: > 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 it would be a great idea to add a rc.conf variable that would control the behaviour of dhclient and dns. In windows for example, when you set to use DHCP for an interface, you are given the option to obtain DNS from DHCP or set is statically. Simillar functionality via rc.conf variables would be ideal in my opinion.