IAccounts <[EMAIL PROTECTED]> writes:
> > > Alternatively is there a way to dynamically tell BIND to get it's
> > > forwarders list from /etc/resolv.conf?
> >
> > This could be done pretty much the same way. I thought I'd done it on
> > my system, but as I look at named.conf, I don't seem to have ever
> > finished the shell script to auto-generate the named.conf file.
> > Bind 8 doesn't have a sufficiently powerful include mechanism to do
> > this neatly.
>
> I would be very interested in helping (or starting) some development for
> this purpose. I already have created a perl script for generating zone
> files and updating serial numbers, but give me until the beginning of the
> workweek, and I can do this.
>
> Very interesting concept that I would happily put forth time to develop.
> Mail me off list with any other details that you would like considered.
Oh, wait a minute. I *did* have it working already.
I put the line
#include "forwarders-list"
into the options section of my named.conf, and I have my
dhclient-enter-hooks script build that forwarders-list file,
and run named.conf through the C preprocessor to handle the
file inclusion.
dhclient-enter-hooks looks like this:
#!/bin/sh
file=/etc/namedb/forwarders-list
if [ x"$new_domain_name_servers" != x ]; then
echo ' forwarders {' > $file
for n in $new_domain_name_servers ; do
if [ "${n}" != "127.0.0.1" ] ; then
echo " ${n};" >> $file
fi
done
echo " };" >> $file
fi
cpp -P -C /etc/namedb/named.conf > /etc/namedb/named.usable.conf
ndc reload
The only other thing is that named has to be told to use the rebuilt
version, so I specify that in rc.conf, with
named_flags="-u bind -g bind -c /etc/namedb/named.usable.conf" # Flags for
named
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message