From owner-freebsd-hackers Wed Jan 10 18:23:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 4F1B137B404 for ; Wed, 10 Jan 2001 18:23:14 -0800 (PST) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.1/8.11.1) with SMTP id f0B2ND786838 for ; Wed, 10 Jan 2001 21:23:13 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 10 Jan 2001 21:23:13 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: freebsd-hackers@FreeBSD.org Subject: Setting default hostname to localhost Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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