[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localhost in /etc/hosts



On 2006-11-19 00:12:53 +0100, Matus UHLAR - fantomas wrote:
> On 17.11.06 08:25, Vincent Lefevre wrote:
> > On 2006-11-14 09:19:09 +0100, Matus UHLAR - fantomas wrote:
> > > I do and I did. However, "hostname -s", contrary to hostname's
> > > manual page, does not return first segment of the system
> > > hostname, but resolves the FQDN first and returns first segment
> > > of the resulting hostname. See my (refused) bugreport:
> > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345761
> > 
> > The hosts man page is clear.
> 
> But the 'hostname' man page is not.

as expected. If you want to configure your /etc/hosts file, you should
do "man hosts", not "man hostname". The hostname man page mentions
/etc/hosts just for information; it doesn't use /etc/hosts directly
anyway.

> the problem is, many packages have unexpected behaviour when
> 127.0.0.1 does not resolve to localhost.

Which package?

Also, you should report a bug. Do you have the numbers of the bug
reports?

> and I do think that 127.0.0.1 should map to localhost.

There's no need, and I don't see why it would be useful (except as
a workaround for some bugs). The important is the opposite: localhost
should resolve as 127.0.0.1.

> (Sorry, I'm too lazy now to search the debian-devel discussion about
> way to correctly setting up a hostname)

The best way IMHO is to have the host name identical to the FQDN.
This makes things less ambiguous.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



Reply to: