[RFC] Automated generation of /etc/resolv.conf from the rc.d script

Eygene Ryabinkin rea-fbsd at codelabs.ru
Fri Dec 14 02:14:43 PST 2007


Poul-Henning, good day.

Fri, Dec 14, 2007 at 09:55:29AM +0000, Poul-Henning Kamp wrote:
> In message <7ExUpek150AdEdP4WR1b6w at 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


More information about the freebsd-current mailing list