Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2008 20:51:29 +0200
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-current@freebsd.org
Subject:   Re: [RFC] Automated generation of /etc/resolv.conf from the rc.d script
Message-ID:  <20080424185129.GC1672@roadrunner.spoerlein.net>
In-Reply-To: <200804240821.40601.jhb@freebsd.org>
References:  <dEZnki0Fi32EvMrDEnqcgDeNQSc@Bbw9J2Iynx0QjNoWuQ4YSitYS3A> <MIKiw94aov2StL37zxYPU2cwfyE@NKorCT8tqQREs5VbYbldlgOz9%2B8> <RlIwVx1VnA2Q57cUUvUPn30sch4@BBB3ZKOzjjN0cxeKaWhgH87x7VY> <200804240821.40601.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24.04.2008 at 08:21:40 -0400, John Baldwin wrote:
> On Monday 14 April 2008 11:44:13 am Eygene Ryabinkin wrote:
> > At last, I did the needed modifications: patches against 7.0 from
> > yesterday, April 13th, are attached.  The first one enables the
> > creation of /etc/resolv.conf from rc.conf variables and the second
> > brings the named forwarders rewriting using values obtained via
> > DHCP.  I had touched dhclient-script, but it was really needed,
> > because it is not good to have simular functionality in /etc/rc.d/resolv
> > and in the dhclient-script.
> >
> > I decided not to cope with modifications of /etc/namedb/named.conf,
> > but rather to create other file, /etc/namedb/named.forwarders.conf,
> > that should be included from the main configuration.
> >
> > I am living for two days with this configuration (DHCP + local named
> > instance) and no problems were spotted yet.
> >
> > Testing and feedback are more than welcome.
> 
> 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.  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.

People always forget, that a computer can get an IP address via ppp(8),
too. That's why I'm (still) running a local bind and have hooks to
update the forwarders + reload in dhclient-enter-hooks *AND* ppp.linkup.

I'd say that nscd(8) is the way to go for 7.0 and up (though I still
haven't set it up for myself ....)

Cheers,
Ulrich Spoerlein
-- 
It is better to remain silent and be thought a fool,
than to speak, and remove all doubt.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080424185129.GC1672>