Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2007 13:14:40 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [RFC] Automated generation of /etc/resolv.conf from the rc.d script
Message-ID:  <dEZnki0Fi32EvMrDEnqcgDeNQSc@Bbw9J2Iynx0QjNoWuQ4YSitYS3A>
In-Reply-To: <72123.1197626129@critter.freebsd.dk>
References:  <7ExUpek150AdEdP4WR1b6w@lz%2BEvuNSgXKgs9kqjMxQNA> <72123.1197626129@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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