Subject: Re: localhost search order (was: afterboot)
To: NetBSD install list <>
From: Greg A. Woods <>
List: tech-install
Date: 06/27/2003 01:27:05
[ On , June 26, 2003 at 23:00:35 (-0400), Perry E. Metzger wrote: ]
> Subject: Re: localhost search order (was: afterboot)
> I was under the impression these days that the dogma was not to make
> "localhost" a member of the local domain but to make it "top level"
> instead.

Indeed it is, and has been for some time (IIUC).

Lots of DNS domains do include an A RR for a "localhost" hostname
though, mostly to work around helpful software that insists on fully
qualifying what look like unqualified hostnames.

However I don't think applications should automatically expect to be
able to resolve an address for a "localhost" in whatever domain they
might find to have been configured in /etc/resolv.conf, if any.

Likewise I don't think sysinst should create any /etc/hosts entries at
all, and especially not one for a fully qualified "localhost".  No such
entries are necessary if IP numbers are used to configure interfaces (as
they should be) and the forgotten existance of such entries can cause
confusion if/when a machine is renamed, or is assigned a new address, or
is moved to a new default domain.

The simple system-configured hostname (i.e. via 'hostname -s') should be
unqualified and the default domain should be stored in a "domain"
statement in /etc/resolv.conf (where applications can discover it by any
one of several means).  On non-NIS machines, or where the default NIS
domain is the same as the default DNS domain, the host's default domain
name can also be stored with 'domainname -s', preferably with a leading
dot ('.') so that it can just be concatenated directly onto the hostname
to create a fully qualified host domain name.

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>