[RFC] Automated generation of /etc/resolv.conf from the rc.d
script
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Mon Apr 14 15:55:51 UTC 2008
Poul-Henning, good day.
Fri, Dec 14, 2007 at 02:07:00PM +0300, Eygene Ryabinkin wrote:
> Fri, Dec 14, 2007 at 10:57:38AM +0000, Poul-Henning Kamp wrote:
> > In message <dEZnki0Fi32EvMrDEnqcgDeNQSc at Bbw9J2Iynx0QjNoWuQ4YSitYS3A>, Eygene Ryabinkin writes:
> > >> 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 [...]
> >
> > Yes, I know that, but I would like to see it controllable from rc.conf
> > like the rest of our network configuration.
>
> OK, since running local DNS instance is a neat idea, I will try to
> draft the modifications for the dhclient-exit-hooks, as I described
> in the previous mail.
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.
--
Eygene
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rc.d-resolv-implement-creation-of-resolv.conf-from.patch
Type: text/x-diff
Size: 3406 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080414/d0482e8c/0001-rc.d-resolv-implement-creation-of-resolv.conf-from.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Implement-creation-of-named-8-forwarders-file-via.patch
Type: text/x-diff
Size: 16948 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080414/d0482e8c/0002-Implement-creation-of-named-8-forwarders-file-via.bin
More information about the freebsd-current
mailing list