Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2001 21:23:13 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   Setting default hostname to localhost
Message-ID:  <Pine.NEB.3.96L.1010110211942.86697B-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

Under FreeBSD, the default hostname in /etc/defaults/rc.conf is currently
an empty string, "".  If the hostname is not later defined, then the
system will use this through multi-user mode, which can disrupt
application behavior.  This can occur if DHCP doesn't provide a hostname,
or if the user neglects to configure one.  Applications such as lpd get
very upset and refuse to run with no hostname, which breaks printing on
hosts not connected to the network.  Similarly, cvsup refuses to run with
a GUI since it can't resolve the hostname; similar sorts of situations can
arise with SSH X11 forwarding and other applications (GNOME whined at me
for a while, but that may have been fixed?).  In any case, the failure to
define a hostname seems to result in application failures.  Apple's Darwin
addresses this by setting the default hostname to "localhost" which, due
to /etc/hosts, generally resolves properly and means applications can
behave moderately correctly.  Unless there are some really good reasons
not to (which there may be), I'd like to commit changes to -CURRENT's
/etc/default/rc.conf to change the default hostname to "localhost".  If
the user configures a hostname, or DHCP provides one, it will be
overridden, of course, so should not impact any configuration but one
where the hostname is left undefined.

Thoughts?

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1010110211942.86697B-100000>