From owner-freebsd-current@FreeBSD.ORG Fri Dec 14 10:14:43 2007 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 899E316A468 for ; Fri, 14 Dec 2007 10:14:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 445DC13C442 for ; Fri, 14 Dec 2007 10:14:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=pyVtuUz8ZbPrAn2yxKnM7kyYrIYNPb9B1VbCvtpEXBndQcnSROcjOobOCFfjfVxp0jgDRu4Rjmu7se9r8arV/OH5a+oe9yj1JimOdCdR6L4rwdSNuSxXUQEHLb//rAiRcpTgSa77fuLcKJMlRjzas0EsdxqrTgif4n/EB85DWG0=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1J37Z3-0007Gm-Tf; Fri, 14 Dec 2007 13:14:42 +0300 Date: Fri, 14 Dec 2007 13:14:40 +0300 From: Eygene Ryabinkin To: Poul-Henning Kamp Message-ID: References: <7ExUpek150AdEdP4WR1b6w@lz+EvuNSgXKgs9kqjMxQNA> <72123.1197626129@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <72123.1197626129@critter.freebsd.dk> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-3.2 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_00 Cc: 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, 14 Dec 2007 10:14:43 -0000 Poul-Henning, good day. Fri, Dec 14, 2007 at 09:55:29AM +0000, Poul-Henning Kamp wrote: > In message <7ExUpek150AdEdP4WR1b6w@lz+EvuNSgXKgs9kqjMxQNA>, Eygene Ryabinkin writes: > > >But there is one bit that > >I am missing with the current /etc/rc.d scripts: automated construction > >of /etc/resolv.conf basing on the variables from /etc/rc.conf. > > It's worse than that. > > It should be possible to run a local named even when we run DHCP, > and it shuld be an option, to have it automatically forward to the > DNS servers we learn from DHCP. This can be achieved with the script /etc/dhclient-exit-hooks that will create the file with named 'forwarders' clause using values from 'new_domain_name' and 'new_domain_name_servers' variables that are exported to the hooks script by /sbin/dhclient-script. The former file can be included from named.conf, so the restart or reload of the local named instance from the exit hooks script will do the trick. Did you meant that? -- Eygene