From owner-freebsd-current@FreeBSD.ORG Fri Apr 25 20:45:44 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDC70106566B for ; Fri, 25 Apr 2008 20:45:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C2A9D8FC0C for ; Fri, 25 Apr 2008 20:45:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id 2A1141A4D80; Fri, 25 Apr 2008 13:45:44 -0700 (PDT) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m3PKjTpg056623; Fri, 25 Apr 2008 16:45:32 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eygene Ryabinkin Date: Fri, 25 Apr 2008 16:07:39 -0400 User-Agent: KMail/1.9.7 References: <200804240821.40601.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804251607.39798.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 25 Apr 2008 16:45:32 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/6938/Fri Apr 25 13:01:47 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Poul-Henning Kamp , freebsd-current@freebsd.org Subject: Re: [RFC] Automated generation of /etc/resolv.conf from the rc.d script X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 25 Apr 2008 20:45:44 -0000 On Friday 25 April 2008 11:53:13 am Eygene Ryabinkin wrote: > John, good day. > > Thu, Apr 24, 2008 at 08:21:40AM -0400, John Baldwin wrote: > > You can already override the domain name and DNS servers (including either > > overriding, providing a default, or prepending or appending to the list) via > > setings in /etc/dhclient.conf, so I don't think new rc.conf variables for > > that would be warranted. > > In the case of DHCP -- yes, I can. But sometimes I need to specify > the static entries for the resolv.conf: I am using it when I am > working in some places where DHCP isn't available, so I am creating > branched /etc/rc.conf. And it is useful to have all variables in > one place. For my usage, dhclient.conf is not relevant, since I > am happily taking all that was given me via DHCP. This was not clear from your earlier e-mails where it seemed that you were worried primarily about munging dhclient-script (which would be the DHCP case). Given that you can already manage the DHCP case via /etc/dhclient.conf I think adding rc.conf variables to duplicate that functionality would be superfluous. > > Updating named.conf to forward is a neat idea. > > Howver, on my laptop on HEAD I've ended up just running nscd instead of a > > local DNS server and doing a 'nscd -I hosts' when I get a new lease to flush > > the host cache. When I get to my laptop I'll post my bits of > > dhclient-exit-hooks and dhclient.conf to make this work. > > Yes, it is also the way to go, but, at was said by Poul-Henning, > nscd is not so smart to know all particulars of DNS, namely -- the > different TTL values for the different records and zones. In the case of a laptop (which seems to be what you are doing) where you frequently change locations I think nscd's behavior in this instance is probably fine. Note that you can always clear the cache by hand in edge cases. > May be I can integrate the usage of the nscd to the dhclient-script > and rc.conf? Is it desirable? nscd is already well integrated with rc.conf. Perhaps you could automate the clearing of the 'hosts' database (my exit-hooks), but I'm not sure that is worth adding all the fuss for since it is a bit of an edge case and it is very easy to do this via the exit-hooks. FWIW, I already adjust my domain name (to trim the annoying \000 string you get when you append to the domain from a Windows DNS server because it violates the RFC and the dhclient authors strict religiously to the RFC rather than add a workaround) in an enter hook, so you can easily modify your DNS parameters there already. -- John Baldwin