Subject: Re: named.conf
To: None <tech-userlevel@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 01/26/2002 15:25:00
[ On , January 26, 2002 at 14:40:28 (-0500), Perry E. Metzger wrote: ]
> Subject: named.conf
>
> There are two ways to do this: change the default in the binary, or
> change the default in /etc/defaults/rc.conf.
> 
> Which do people prefer that I do?

I slightly prefer a third option of leaving the binary alone and moving
/etc/nameb/named.conf to /usr/share/examples.

> My opinion at the moment is that
> changing it in /etc/defaults/rc.conf is "correct" because changing it
> in the binary could break people tracking current, but on the other
> hand, it is bloody obvious that for ten years in NetBSD the file has
> natively lived in /etc/namedb/ so perhaps the default should change in
> the binary.

Historically /etc/namedb has been a fabrication -- a convenient place to
locate named-related files so that they don't clutter the parent /etc
directory.  I believe that's why the example now in /etc/namedb/namedb.conf
contains the lines:

options {
        directory "/etc/namedb";
};

I believe the original idea of putting the example in /etc/namedb was
that it would prevent named from starting and that if someone wanted to
run named they would just move it back out to /etc (or do as you and I
do and create a symlink in /etc pointing to it).  Obviously that
happened long before we had /usr/share/examples.

Note that if you install BIND-9 from source you'll get a new
$prefix/share/examples/named/named.conf file containing a complex
example configuration.

Now that /etc/rc.d works the way it does we normally enable daemons by
turning them on in /etc/rc.conf, so I guess it would be OK to just move
named.conf back out into /etc as it is a "working example" -- i.e. you
don't have to change it in any way just to run a basic caching forwarder.

BTW, a more complete and proper sample configuration for BIND-8 is
available here:

	ftp://ftp.weird.com/ftp/pub/local/named-sample-conf.tar.gz
	ftp://ftp.weird.com/ftp/pub/local/named-sample-conf.src.shar

(the latter is a suitable replacement for /usr/src/etc/namedb, and the
former should be what results from "make install")

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>