Re: Proposed new scheme for resolving the system hostname
On Fri, Jun 17, 2005 at 07:26:11PM +0200, Thomas Hood wrote:
> There are applications in Debian that assume that the system hostname
> can be resolved. You may be right when you say that these applications
> *should not* make that assumption; but they *do* make it.
Yes, they should be fixed.
> Even the
> "hostname" program provides an option that prints the result of running
> gethostbyname() on the result of gethostname().
And that already gives the wrong result on multi-homed machines. For
example, we have a router here where `hostname -f` gives the name of the
intranet interface and that is almost guaranteed to be wrong for any
configuration choice. In this case, the host name is resolvable in two
different domains, and `hostname -f` chooses the wrong one. On the
laptop I sometimes use the hostname is not registered in any DNS domain
(and I'd be very upset if the hostname changed when I move from one DHCP
server and thus one DNS zone to an other).
> The current Debian installer deals with the assumption, imperfectly, by
> putting the system hostname in /etc/hosts. My proposal aims to improve
> that support.
>
> An alternative to fixing support for the assumption is to decide that
> applications should not make the assumption. We could add an article to
> Debian policy forbidding applications to rely on the system hostname
> being resolvable.
In my opinion this should definitely be the goal.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences,
Laboratory of Parallel and Distributed Systems
Address : H-1132 Budapest Victor Hugo u. 18-22. Hungary
Phone/Fax : +36 1 329-78-64 (secretary)
W3 : http://www.lpds.sztaki.hu
---------------------------------------------------------
Reply to: