Subject: Re: BIND9-current
To: Nicolas Saurbier <Nicolas.Saurbier@biodata.de>
From: Andrew Gillham <gillham@vaultron.com>
List: netbsd-help
Date: 10/30/2002 09:48:01
On Wed, Oct 30, 2002 at 12:05:23PM +0100, Nicolas Saurbier wrote:
> Hi,
> 
> reading "DNS and BIND on NETBSD" by Hoang Q. Tran confuses me a bit...
> On page two, he describes how to start BIND on startup
> 
> # vi /etc/rc.conf.d/named9 and add:
> 
> named9=YES
> named_flags="-c /etc/namedb/named.conf"
> 
> There is no named9 in /etc/rc.conf.d/

The document perhaps needs to be clarified slightly.  You are supposed to
do exactly what it tells you.  The trick is that the file doesn't exist
and you're actually creating it by following the instructions above.
E.g. You're adding the lines above to an new empty file that vi is creating.

If you're curious why the config information goes in /etc/rc.conf.d/named9
rather than /etc/rc.conf, here is a blurb from /etc/rc.subr:

#
# load_rc_config
#       Source in the configuration file for a given command.
#
load_rc_config()
{
        _command=$1
        if [ -z "$_command" ]; then
                err 3 'USAGE: load_rc_config command'
        fi

        if [ -z "$_rc_conf_loaded" ]; then
                . /etc/rc.conf
                _rc_conf_loaded=YES
        fi
        if [ -f /etc/rc.conf.d/"$_command" ]; then
                . /etc/rc.conf.d/"$_command"
        fi
}

So note that the last file that is looked for in the case of a command
'named9' would be /etc/rc.conf.d/named9.

As far as actually starting BIND you can just add it to /etc/rc.local as
someone already mentioned.

Of course it would be nice if people would think for 5 minutes about the
real question before flaming people. :-)

-Andrew