Debian Bug report logs - #247734
debian-installer: incorrect /etc/hosts localhost line

version graph

Package: netcfg; Maintainer for netcfg is Debian Install System Team <debian-boot@lists.debian.org>; Source for netcfg is src:netcfg.

Reported by: pmachard@debian.org

Date: Thu, 6 May 2004 18:48:02 UTC

Severity: normal

Fixed in version netcfg/0.69

Done: Joshua Kwan <joshk@triplehelix.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <ballombe@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Bill Allombert <ballombe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: debian-installer: incorrect /etc/hosts localhost line
Date: Thu, 6 May 2004 20:33:47 +0200
Package: debian-installer
Severity: normal

(From Pierre Machard on irc)

Hello dream-installer Team,

/etc/hosts in the debian-installer environnement is not correct
after network configuration is complete (manual).

it read:
127.0.0.1 localhost pingo
10.10.0.17 pingo.miss-knife.net pingo

  From irc:

<migus> there should not be anything after localhost
> migus: are you sure ?
<migus> yp certainly
<migus> dnsdomain is confused if there is something

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 



Changed Bug submitter from Bill Allombert <ballombe@debian.org> to pmachard@debian.org. Request was from Bill Allombert <allomber@math.u-bordeaux.fr> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `debian-installer' to `netcfg'. Request was from Pierre Machard <pmachard@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: pending Request was from Pierre Machard <pmachard@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #14 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: Joshua Kwan <joshk@triplehelix.org>
Cc: 247734-submitter@bugs.debian.org
Subject: Re: /etc/hosts 127.0.0.1
Date: Thu, 03 Jun 2004 11:02:17 +0200
On Thu, 2004-06-03 at 09:03, Joshua Kwan wrote:
> What do you think?

First let me say that I don't pretend to be the expert on this.
However, I have been looking for the Right Answer to this question
for a while now.

If we are going in circles on this question then I begin to suspect
that there is _no_ configuration that works perfectly.  Take my
machine, a laptop with intermittent network connectivity.  Currently
I have:

	$ cat /etc/hostname
	thanatos
	$ hostname
	thanatos

1. First take:

	127.0.0.1	localhost

Then sudo prints an error message because it can't look up my hostname:

	$ cd /tmp
	$ mkdir a
	$ cd a
	$ touch foo bar
	$ sudo ls
	sudo: unable to lookup thanatos via gethostbyname()
	bar  foo

I don't know why sudo needs to do gethostbyname(), but anyway ....
I assume that there is a whole class of applications that have the
same problem.


2. Second take:

	127.0.0.1	localhost	thanatos

Now sudo is happy.  However, the following results still don't seem
right.

	$ hostname
	thanatos
	$ dnsdomainname
	$ hostname --fqdn
	localhost

A result of this is that mail sent using evolution and other mail
programs has:

	Message-Id: <1086247471.27681.273.camel@localhost>

because these programs use the equivalent of "hostname --fqdn" to
build the message I.D.


3. Third take:

	127.0.0.1	thanatos	localhost

Now I get:

	$ hostname
	thanatos
	$ dnsdomainname
	$ hostname --fqdn
	thanatos

which looks slightly more reasonable.  dnsdomainname is still empty,
but that doesn't bother me.  This is how I usually have things set up.


4. Fourth take:

	127.0.0.1	thanatos.aglu.demon.nl	thanatos	localhost

	$ hostname
	thanatos
	$ dnsdomainname
	aglu.demon.nl
	$ hostname --fqdn
	thanatos.aglu.demon.nl

Wow, this is looking pretty good, right?  sudo works and message I.D.s
include a FQDN for my machine.

But people have rejected this
    http://lists.debian.org/debian-devel/2003/05/msg02173.html
because it supposedly breaks some apps.  (omniorb was mentioned.)

That message is part of a discussion that started here:
    http://lists.debian.org/debian-devel/2003/05/msg02057.html


5. Some people say that they set their hostname to a FQDN.  If I set
my hostname to 'thanatos.aglu.demon.nl' along with:

	127.0.0.1	thanatos.aglu.demon.nl	thanatos	localhost

then I get:

	$ hostname
	thanatos.aglu.demon.nl
	$ dnsdomainname
	aglu.demon.nl
	$ hostname --fqdn
	thanatos.aglu.demon.nl

My computer no longer has a dot-free hostname.  Also, this approach
is objectionable on the grounds that a computer has one and only
one UNIX hostname whereas it can have many different fully
qualified domain names.


6. I set hostname to 'thanatos.aglu.demon.nl'.  /etc/hosts contains:

	127.0.0.1	thanatos	thanatos.aglu.demon.nl	localhost

Then I get:

	$ hostname
	thanatos.aglu.demon.nl
	$ dnsdomainname
	aglu.demon.nl
	$ hostname --fqdn
	thanatos

Now I can get the unqualified hostname by asking for the fully
qualified hostname.  _That_ makes a whole lot of sense.


7. Balazs GAL suggested:

	127.0.0.1       localhost
	192.168.65.5    bohr.local bohr

but Bob Proulx replied (rightly) that lookups of the hostname will
then break on a laptop whose external network interfaces are
intermittent.  Herbert Xu suggested that the external addresses
be attached to the loopback interface when the external interfaces
are down.

    http://lists.debian.org/debian-devel/2003/05/msg02197.html

I haven't tested this.

Marco d'Itri closed the discussion by saying that these issues are
matters of taste and religion.  I think that that is a cop-out. 
Debian as a project needs to decide on one approach, to make the
installer configure systems according to that approach and to work
toward making everything work perfectly using that approach.
Local administrators can of course customize their systems later
if they wish.

--
Thomas Hood




Information stored:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Pierre Machard <pmachard@debian.org>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #19 received at 247734-quiet@bugs.debian.org (full text, mbox):

From: Pierre Machard <pmachard@debian.org>
To: Thomas Hood <jdthood@aglu.demon.nl>, 247734-quiet@bugs.debian.org
Cc: Joshua Kwan <joshk@triplehelix.org>
Subject: Re: Bug#247734: /etc/hosts 127.0.0.1
Date: Thu, 3 Jun 2004 11:42:52 +0200
[Message part 1 (text/plain, inline)]
Hi,

Thanks a lot for your summary.

however, theses settings can have very anoying side effects.

For e.x.: I have to wait a very long time before exim is able to run.
The boot tooks up to 3 minutes which is not acceptable to me. Note that
it occurs when I do not use the network). Exim was installed right 
after the debian-installer.

I have not access to my laptop now, but we _really_ have to find the
best solution.

Cheers,
--
                                Pierre Machard
<pmachard@debian.org>                                 http://debian.org
GPG: 1024D/23706F87 : B906 A53F 84E0 49B6 6CF7 82C2 B3A0 2D66 2370 6F87

[signature.asc (application/pgp-signature, inline)]

Tags removed: pending Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #24 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734-submitter@bugs.debian.org, Joshua Kwan <joshk@triplehelix.org>, Chris Hanson <cph@zurich.ai.mit.edu>
Subject: Chris Hanson's opinion sought
Date: Fri, 04 Jun 2004 12:08:02 +0200
Chris Hanson is one person whose opinion I would like to hear.
He maintains laptop-net and has to support the relatively
complicated case of two laptops that roam together from one
network to another.

Chris: Please read #247734.  The basic question is: What should
be on the default "127.0.0.1" line in /etc/hosts?

If it is the case that no setup works with every program, then
what has to give?  Do we tell the mail programs to use something
other than "hostname --fqdn" for building message i.d.'s?   Do
we tell roaming users to update their /etc/hosts dynamically?
Do we fix sudo et al so that they don't need to look up an IP
address for the hostname?
--
Thomas







Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #27 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734-submitter@bugs.debian.org, Joshua Kwan <joshk@triplehelix.org>
Subject: no consistency in mail message i.d.'s
Date: Fri, 04 Jun 2004 21:03:31 +0200
MUAs again
~~~~~~~~~~
Different MUAs have very different ways of coming up with the
"host" part of message i.d.s.

* /usr/bin/mail in the mailx package uses $(/bin/hostname)
* elm (or, rather, postfix) uses whatever postfix's "myhostname"
  parameter is set to in /etc/postfix/main.cf
* mutt uses $(cat /etc/mailname)
* evolution mail uses $(/bin/hostname --fqdn)
* mozilla mail uses the host part of the sender's e-mail address
* balsa uses $(hostname) from the time that X starts
* sylpheed tacks on the whole sender e-mail address

Clearly we should not allow the practices of mail software to
govern our decision about what we put into /etc/hosts.

sudo again
~~~~~~~~~~
I have just been looking at sudo and it seems that sudo can't be
stopped from trying to resolve $(hostname) even if one puts

    Defaults  !fqdn

in /etc/sudoers.  So I guess the hostname does have to be on some
line in /etc/hosts.  It doesn't have to be the canonical (first)
name though; it can be an alias.

exim4
~~~~~
Pierre Machard wrote:
> theses settings can have very anoying side effects.
> For e.x.: I have to wait a very long time before exim is able to run.

Which configuration is it that causes this delay?  _What_ exactly
is delaying?  Why do you think that this delay occurs?

--
Thomas






Information stored:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Pierre Machard <pmachard@debian.org>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #32 received at 247734-quiet@bugs.debian.org (full text, mbox):

From: Pierre Machard <pmachard@debian.org>
To: Thomas Hood <jdthood@aglu.demon.nl>, 247734-quiet@bugs.debian.org
Cc: 247734-submitter@bugs.debian.org, Joshua Kwan <joshk@triplehelix.org>
Subject: Re: Bug#247734: no consistency in mail message i.d.'s
Date: Sun, 6 Jun 2004 08:21:50 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Fri, Jun 04, 2004 at 09:03:31PM +0200, Thomas Hood wrote:
[...]
> exim4
> ~~~~~
> Pierre Machard wrote:
> > theses settings can have very anoying side effects.
> > For e.x.: I have to wait a very long time before exim is able to run.
> 
> Which configuration is it that causes this delay?  _What_ exactly
> is delaying?  Why do you think that this delay occurs?

I have configured exim as satellite system. (I am only using fix IPs)

Why I think that delays occurs it's because when I am offline, or When
my DSL connection is down, exim's startup takes about 1 minute (only for 
exim). So I really belive that there should be a DNS resolution
somewhere which fails.

2004-06-05 21:12:16 exim 4.32 daemon started: pid=846, -q30m, listening for SMTP on [127.0.0.1]:25
2004-06-05 21:12:57 Start queue run: pid=850

Before that exim runs, I saw on syslog.conf that dnsmasq is starting
too. I do not have enough knowledge to dermine whether or not this
dnsmasq has an influence of not.

root@twinette:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.107 twinette.machard.com twinette

root@twinette:~# cat /etc/resolv.conf
nameserver 213.228.0.23
nameserver 212.27.32.176
search machard.com

Cheers,
-- 
                                Pierre Machard
<pmachard@debian.org>                                 http://debian.org
GPG: 1024D/23706F87 : B906 A53F 84E0 49B6 6CF7 82C2 B3A0 2D66 2370 6F87

[signature.asc (application/pgp-signature, inline)]

Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #38 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734-submitter@bugs.debian.org
Cc: Joshua Kwan <joshk@triplehelix.org>
Subject: Re: Bug#247734: no consistency in mail message i.d.'s
Date: Sun, 06 Jun 2004 09:25:52 +0200
On Sun, 2004-06-06 at 08:21, Pierre Machard wrote:
> root@twinette:~# cat /etc/hosts
> 127.0.0.1 localhost.localdomain localhost
> 192.168.0.107 twinette.machard.com twinette

What happens if you set things up the way the debian-installer
sets them up?

# /etc/hosts
127.0.0.1	localhost	twinette


As for /etc/resolv.conf, I suggest you try the resolvconf package.
With resolvconf installed nameservers are only listed in resolv.conf
when they are available.
--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #43 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734@bugs.debian.org, 247734-submitter@bugs.debian.org
Subject: hostname on multiple lines in /etc/hosts
Date: Mon, 07 Jun 2004 17:22:15 +0200
> 127.0.0.1	localhost	pingo
> 10.10.0.17	pingo.miss-knife.net	pingo

On rereading the original message I realize that I overlooked the most
important fact.  The hostname, 'pingo', appears on two lines in the
/etc/hosts file.  The presence of 'pingo' on the 127.0.0.1 line causes
'localhost' to be pingo's canonical hostname whereas (I take it) the
user wants 'pingo.miss-knife.net' to be pingo's canonical hostname.
Pierre Machard: Have I got that right?

I can think of a couple of different ways of solving this problem.
The first is to eliminate 'pingo' from the 127.0.0.1 line if and
only if 'pingo' appears on some other line.

A second approach to solving the problem is to have two separate
127.0.0.1 lines, one of them at the very end.  It acts as a default
canonical hostname specifier for the machine.  Experiment shows that
this gives the Right behavior; however I am not sure that it is legal
for one IP address to appear on more than one line in /etc/hosts.

# /etc/init.d/dnsmasq restart
# cat /etc/hosts
127.0.0.1       localhost
10.10.0.17      pingo.miss-knife.net    pingo
127.0.0.1       pingo
# hostname
pingo
# hostname --fqdn
pingo.miss-knife.net
# # Note that dnsmasq (which looks in /etc/hosts) is running
# host pingo
pingo has address 127.0.0.1
pingo has address 10.10.0.17
# host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.
1.0.0.127.in-addr.arpa domain name pointer pingo.
# vi /etc/hosts
# /etc/init.d/dnsmasq restart
# cat /etc/hosts
127.0.0.1       localhost
127.0.0.1       pingo
# hostname --fqdn
pingo
# host pingo
pingo has address 127.0.0.1
# host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.
1.0.0.127.in-addr.arpa domain name pointer pingo.

--
Thomas




Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Pierre Machard <pmachard@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #51 received at 247734@bugs.debian.org (full text, mbox):

From: Pierre Machard <pmachard@debian.org>
To: Thomas Hood <jdthood@aglu.demon.nl>, 247734@bugs.debian.org
Subject: Re: Bug#247734: hostname on multiple lines in /etc/hosts
Date: Mon, 7 Jun 2004 23:02:29 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Mon, Jun 07, 2004 at 05:22:15PM +0200, Thomas Hood wrote:
> > 127.0.0.1	localhost	pingo
> > 10.10.0.17	pingo.miss-knife.net	pingo
> 
> On rereading the original message I realize that I overlooked the most
> important fact.  The hostname, 'pingo', appears on two lines in the
> /etc/hosts file.  The presence of 'pingo' on the 127.0.0.1 line causes
> 'localhost' to be pingo's canonical hostname whereas (I take it) the
> user wants 'pingo.miss-knife.net' to be pingo's canonical hostname.
> Pierre Machard: Have I got that right?

Yes, you did.

> I can think of a couple of different ways of solving this problem.
> The first is to eliminate 'pingo' from the 127.0.0.1 line if and
> only if 'pingo' appears on some other line.

That's what I commited to the subversion tree, but apparently Joshua
did not integrate this change. 

> A second approach to solving the problem is to have two separate
> 127.0.0.1 lines, one of them at the very end.  It acts as a default
> canonical hostname specifier for the machine.  Experiment shows that
> this gives the Right behavior; however I am not sure that it is legal
> for one IP address to appear on more than one line in /etc/hosts.

It's very difficult to find info about that. 

> # /etc/init.d/dnsmasq restart
> # cat /etc/hosts
> 127.0.0.1       localhost
> 10.10.0.17      pingo.miss-knife.net    pingo
> 127.0.0.1       pingo
> # hostname
> pingo
> # hostname --fqdn
> pingo.miss-knife.net
> # # Note that dnsmasq (which looks in /etc/hosts) is running
> # host pingo
> pingo has address 127.0.0.1
> pingo has address 10.10.0.17
> # host 127.0.0.1
> 1.0.0.127.in-addr.arpa domain name pointer localhost.
> 1.0.0.127.in-addr.arpa domain name pointer pingo.
> # vi /etc/hosts
> # /etc/init.d/dnsmasq restart
> # cat /etc/hosts
> 127.0.0.1       localhost
> 127.0.0.1       pingo
> # hostname --fqdn
> pingo
> # host pingo
> pingo has address 127.0.0.1
> # host 127.0.0.1
> 1.0.0.127.in-addr.arpa domain name pointer localhost.
> 1.0.0.127.in-addr.arpa domain name pointer pingo. 

Somehow interesting, maybe we should ask to d-devel@l.d.o ?

Cheers,
-- 
                                Pierre Machard
<pmachard@debian.org>                                 http://debian.org
GPG: 1024D/23706F87 : B906 A53F 84E0 49B6 6CF7 82C2 B3A0 2D66 2370 6F87

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #56 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: Pierre Machard <pmachard@debian.org>
Cc: 247734@bugs.debian.org
Subject: Re: Bug#247734: hostname on multiple lines in /etc/hosts
Date: Mon, 07 Jun 2004 23:58:48 +0200
On Mon, 2004-06-07 at 23:02, Pierre Machard wrote:
> > I can think of a couple of different ways of solving this problem.
> > The first is to eliminate 'pingo' from the 127.0.0.1 line if and
> > only if 'pingo' appears on some other line.
> 
> That's what I commited to the subversion tree, but apparently Joshua
> did not integrate this change.

I suppose that is the less risky thing to do since it doesn't involve
us in creating hosts files with multiple lines for the same IP address.
Can this be implemented easily and obviously correctly?


> > 127.0.0.1       localhost
> > 10.10.0.17      pingo.miss-knife.net    pingo
> > 127.0.0.1       pingo
>
> Somehow interesting, maybe we should ask to d-devel@l.d.o ?

If no one subscribed to netcfg bugs knows whether or not the above
is legal then we should ask in a wider forum, yes.
--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #61 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: debian-devel@lists.debian.org
Cc: 247734@bugs.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Tue, 08 Jun 2004 17:19:29 +0200
On Tue, 2004-06-08 at 15:48, Andrew Suffield wrote:
> On Tue, Jun 08, 2004 at 02:40:55PM +0200, Thomas Hood wrote:
> >     127.0.0.1	localhost
> >     127.0.0.1	pingo

> The above two lines *must* be precisely equivalent to *one* of the
> following four lines:
> 
> 127.0.0.1 localhost
> 127.0.0.1 pingo
> 127.0.0.1 localhost pingo
> 127.0.0.1 pingo localhost
> 
> Off the top of my head I couldn't tell you which one it is. But under
> the NSS interface, it must be one of them, because that is what
> gethostby*() is going to return to applications.

With

    127.0.0.1	localhost
    127.0.0.1	pingo

if you look up "pingo" then you get "pingo" as the canonical host name;
and if you look up "localhost" then you get "localhost" as the canonical
host name.  That's different from getting either one or the other as
the canonical host name for both.

Also, as you noted later, it does make a difference to getent and it
could make a difference to other programs that read /etc/hosts
directly.


> Note that #247734 contains confusing misinformation. It uses host(1),
> which ignores /etc/hosts and uses DNS directly - and DNS can represent
> things which NSS cannot.

The experiments with "host" were illustrations of the results you
get from dnsmasq, which reads /etc/hosts.


On Tue, 2004-06-08 at 15:40, Steve Langasek wrote: 
> > Is it legal for /etc/hosts to contain two lines with the same
> > IP address?  In particular, is the following legal?:
> 
> No, these would be duplicate keys and one of the two will never be
> used (or they'll be used inconsistently).

It's clear that both are used because one can look up the IP
address for either 'localhost' or 'pingo'.

What do you mean by 'used inconsistently'?


Steve Langasek continued:
> See other responses for the fix for this; but, er, why would you want
> the canonical name for 127.0.0.1 to be anything other than "localhost"
> anyway?  That just invites confusion, IMHO.

The answer, I guess, first, is that "hostname --fqdn" has to succeed
even if one's machine isn't connected to any network and even if it
doesn't have a fixed public IP address -- otherwise sudo complains. 
So it seems reasonable for one's hostname to resolve to 127.0.0.1.

Second, one wants "hostname --fqdn" to yield the hostname, not "localhost".

But maybe these are things that one should not want.


On Tue, 2004-06-08 at 15:16, Tore Anderson wrote: 
> Set 'pingo' as the first in the list.

But then the canonical host name of localhost is "pingo".  That, I
suppose, is what S.L. would condemn as confusing.  :)


>  On a related note, I've never quite understood why the installer
>  insists that the domain name must not be part of the hostname.  Quite
>  annoying, really.

One reason may be the following.  If the hostname is a FQDN "foo.bar.baz"
and /etc/resolv.conf contains no "domain" option then the latter defaults
to "bar.baz".

What I'm looking for in this thread are reasons why it's not fine
after all to have multiple lines with the same IP address.
--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #66 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734@bugs.debian.org
Subject: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Tue, 08 Jun 2004 17:36:37 +0200
-----Forwarded Message-----
From: Petter Reinholdtsen <pere@hungry.com>
To: debian-devel@lists.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Tue, 08 Jun 2004 17:31:04 +0200

[Steve Langasek]
> See other responses for the fix for this; but, er, why would you want
> the canonical name for 127.0.0.1 to be anything other than "localhost"
> anyway?  That just invites confusion, IMHO.

Not only that.  It break ssh X forwarding because the xauth key will
be wrong.

IP 127.0.0.1 should only map to localhost, and not to the hostname if
the host is connected to the net.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #71 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734@bugs.debian.org
Subject: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Tue, 08 Jun 2004 19:58:58 +0200
-----Forwarded Message-----
From: Greg Folkert <greg@gregfolkert.net>
To: DebianDevel List <debian-devel@lists.debian.org>
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Tue, 08 Jun 2004 12:03:50 -0400

On Tue, 2004-06-08 at 11:31, Petter Reinholdtsen wrote:
> [Steve Langasek]
> > See other responses for the fix for this; but, er, why would you want
> > the canonical name for 127.0.0.1 to be anything other than "localhost"
> > anyway?  That just invites confusion, IMHO.
> 
> Not only that.  It break ssh X forwarding because the xauth key will
> be wrong.
> 
> IP 127.0.0.1 should only map to localhost, and not to the hostname if
> the host is connected to the net.

No, it will not. The resolvers stop at the first resolution. Having
something like:

127.0.0.1 localhost.localdomain localhost
127.0.0.1 somenode.somedom.com	somenode

Will not do what you are talking about. BUT having:

127.0.0.1 somenode.somedom.com	somenode
127.0.0.1 localhost.localdomain localhost

Will cause all kinds of havoc. Including forwarding.

Make sure you understand the infrastructure before you answer others.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #76 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 247734@bugs.debian.org
Subject: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Tue, 08 Jun 2004 21:37:05 +0200
-----Forwarded Message-----
From: Greg Folkert <greg@gregfolkert.net>
To: DebianDevel List <debian-devel@lists.debian.org>
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Tue, 08 Jun 2004 15:11:47 -0400

On Tue, 2004-06-08 at 14:54, Thomas Hood wrote:
> On Tue, 2004-06-08 at 18:03, Greg Folkert wrote:
> > On Tue, 2004-06-08 at 11:31, Petter Reinholdtsen wrote:
> > > It break ssh X forwarding ...
> >
> > No, it will not. The resolvers stop at the first resolution. Having
> > something like:
> > 
> > 127.0.0.1 localhost.localdomain localhost
> > 127.0.0.1 somenode.somedom.com	somenode
> 
> So this is perfectly OK?  Or does this run into other problems?

It would work, but the more correcter (HOW much more correcter? None
more corrector!) version would be a single line with the

127.0.0.1 localhost.localdomain localhost somenode.somedomain.dom somenode

That way, you have the FQDN of lo and all of its aliases.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Bernd Eckenfels <lists@lina.inka.de>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #81 received at 247734@bugs.debian.org (full text, mbox):

From: Bernd Eckenfels <lists@lina.inka.de>
Cc: debian-devel@lists.debian.org, 247734@bugs.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Wed, 9 Jun 2004 02:12:38 +0200
On Tue, Jun 08, 2004 at 05:19:29PM +0200, Thomas Hood wrote:
> Second, one wants "hostname --fqdn" to yield the hostname, not "localhost".

I think i can fix that in hostname, by looking at the first entry in the
aliases which is not "localhost" and which has dots. and if there is none
with dots then use the first which is not localhost, and only of none found,
allow localhost to be returned. That would remove the requirement of
multiple 127.0.0.1 lines.

Greetings
Bernd
-- 
  (OO)      -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
 ( .. )      ecki@{inka.de,linux.de,debian.org}  http://www.eckes.org/
  o--o     1024D/E383CD7E  eckes@IRCNet  v:+497211603874  f:+497211603875
(O____O)  When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #86 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: debian-devel@lists.debian.org
Cc: 247734@bugs.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Wed, 09 Jun 2004 13:03:53 +0200
On Wed, 2004-06-09 at 02:12, Bernd Eckenfels wrote:
> I think i can fix that in hostname, by looking at the first entry in the
> aliases which is not "localhost" and which has dots. and if there is none
> with dots then use the first which is not localhost, and only of none found,
> allow localhost to be returned. That would remove the requirement of
> multiple 127.0.0.1 lines.

I don't think that changing the hostname command is the right way to go.


Marc Haber wrote:
> This is what somebody suggested on IRC. I have configured localhost to
> be 127.0.0.1, and hostname and fqdn to 127.0.1.1. Which hasn't shown
> any bad effects yet.

This is the best idea so far, provided it works.  Anyone see any problem
with it

If not, should the installer therefore write the initial /etc/hosts file
as follows?

If the machine lacks a static IP address and domain name:

    127.0.0.1	localhost.localdomain	localhost
    127.0.1.1   pingo

If the machine has static IP address 10.1.2.3:

    127.0.0.1	localhost.localdomain	localhost
    10.1.2.3    pingo

If the machine has static IP address 10.1.2.3 and domain name
'pingodom':

    127.0.0.1	localhost.localdomain	localhost
    10.1.2.3    pingo.pingodom	pingo

-- 
Thomas Hood <jdthood@yahoo.co.uk>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Bernd Eckenfels <lists@lina.inka.de>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #91 received at 247734@bugs.debian.org (full text, mbox):

From: Bernd Eckenfels <lists@lina.inka.de>
To: debian-devel@lists.debian.org, 247734@bugs.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Wed, 9 Jun 2004 16:33:24 +0200
On Wed, Jun 09, 2004 at 01:03:53PM +0200, Thomas Hood wrote:
>     10.1.2.3    pingo

It is not enough  to entr this to the hosts file, the ip should  also be
pingable, IMHO. Perhaps by adding an alias to lo.

Greetings
Bernd
-- 
  (OO)      -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
 ( .. )      ecki@{inka.de,linux.de,debian.org}  http://www.eckes.org/
  o--o     1024D/E383CD7E  eckes@IRCNet  v:+497211603874  f:+497211603875
(O____O)  When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to joshk@triplehelix.org (Joshua Kwan):
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #96 received at 247734@bugs.debian.org (full text, mbox):

From: joshk@triplehelix.org (Joshua Kwan)
To: Thomas Hood <jdthood@yahoo.co.uk>, 247734@bugs.debian.org
Cc: debian-devel@lists.debian.org
Subject: Re: Bug#247734: /etc/hosts: Two lines with the same IP address?
Date: Wed, 9 Jun 2004 10:05:40 -0700
[Message part 1 (text/plain, inline)]
On Wed, Jun 09, 2004 at 01:03:53PM +0200, Thomas Hood wrote:
> Marc Haber wrote:
> > This is what somebody suggested on IRC. I have configured localhost to
> > be 127.0.0.1, and hostname and fqdn to 127.0.1.1. Which hasn't shown
> > any bad effects yet.
> 
> This is the best idea so far, provided it works.  Anyone see any problem
> with it

Where does 127.0.1.1 fit in to the whole "hostname of system must
resolve into a usable IP" thing? should we have an alias for the lo
device that sets up 127.0.1.1? It sounds like a gross hack.

> If the machine has static IP address 10.1.2.3:
> 
>     127.0.0.1	localhost.localdomain	localhost
>     10.1.2.3    pingo
> 
> If the machine has static IP address 10.1.2.3 and domain name
> 'pingodom':
> 
>     127.0.0.1	localhost.localdomain	localhost
>     10.1.2.3    pingo.pingodom	pingo

This sounds good. I won't commit anything until we all agree though :)

-- 
Joshua Kwan
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to "Adam D. Barratt" <highvol-debian-devel@adam-barratt.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #101 received at 247734@bugs.debian.org (full text, mbox):

From: "Adam D. Barratt" <highvol-debian-devel@adam-barratt.org.uk>
To: Joshua Kwan <joshk@triplehelix.org>
Cc: Thomas Hood <jdthood@yahoo.co.uk>, 247734@bugs.debian.org, debian-devel@lists.debian.org
Subject: Re: Bug#247734: /etc/hosts: Two lines with the same IP address?
Date: Wed, 09 Jun 2004 18:37:41 +0100
On Wed, 2004-06-09 at 18:05, Joshua Kwan wrote:
> On Wed, Jun 09, 2004 at 01:03:53PM +0200, Thomas Hood wrote:
> > Marc Haber wrote:
> > > This is what somebody suggested on IRC. I have configured localhost to
> > > be 127.0.0.1, and hostname and fqdn to 127.0.1.1. Which hasn't shown
> > > any bad effects yet.
> > 
> > This is the best idea so far, provided it works.  Anyone see any problem
> > with it
> 
> Where does 127.0.1.1 fit in to the whole "hostname of system must
> resolve into a usable IP" thing? should we have an alias for the lo
> device that sets up 127.0.1.1? It sounds like a gross hack.

It already *is* a usable IP. lo is 127/8.

Adam




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #106 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 247734@bugs.debian.org, Joshua Kwan <joshk@triplehelix.org>
Subject: Re: Bug#247734: /etc/hosts: Two lines with the same IP address?
Date: Wed, 09 Jun 2004 20:41:24 +0200
On Wed, 2004-06-09 at 19:05, Joshua Kwan wrote:
> Where does 127.0.1.1 fit in to the whole "hostname of system must
> resolve into a usable IP" thing?

I am not aware that the hostname of the system must resolve into
something usable.  I am only aware that sudo prints an error 
message (which may be harmless) if the hostname isn't resolvable
at all.


> should we have an alias for the lo
> device that sets up 127.0.1.1?

I am not sure that that is necessary.  It seems that one can connect
to 127.0.1.1 without further ado.  I have dnsmasq running, for example,
and it answers queries made to 127.0.1.1.

$ host www.matrox.com 127.0.1.1
Using domain server:
Name: 127.0.1.1
Address: 127.0.1.1#53
Aliases:

www.matrox.com has address 138.11.241.200

I wouldn't expect this to work given my routing table:

$ sudo route
Kernel IP routing table
Destination  Gateway    Genmask         Flags Metric Ref    Use Iface
192.168.0.0  *          255.255.255.0   U     0      0        0 wlanp_0
default      hubert     0.0.0.0         UG    0      0        0 wlanp_0

But it does.


>  It sounds like a gross hack.
> 
> > If the machine has static IP address 10.1.2.3:
> > 
> >     127.0.0.1	localhost.localdomain	localhost
> >     10.1.2.3    pingo
> > 
> > If the machine has static IP address 10.1.2.3 and domain name
> > 'pingodom':
> > 
> >     127.0.0.1	localhost.localdomain	localhost
> >     10.1.2.3    pingo.pingodom	pingo
> 
> This sounds good. I won't commit anything until we all agree though :)

Yes, better wait until the debian-devel discussion is finished.
--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#247734; Package netcfg. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #111 received at 247734@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: debian-devel@lists.debian.org
Subject: Re: /etc/hosts: Two lines with the same IP address?
Date: Wed, 09 Jun 2004 21:29:04 +0200
On Wed, 2004-06-09 at 17:31, Bernd Eckenfels wrote:
> I was under the wrong impression  that  on kernels, I cant ping 127.0.1.1,
> but at least on 2.6 with no loopback route I am wrong, and it works fine. I
> think that has changed, but I am not sure if it is something to care about.

I can ping 127.0.1.1 using Linux 2.4.25 too.

My local dnsmasq nameserver answers "host" queries at 127.0.1.1.
I can ssh and telnet to 127.0.1.1.
--
Thomas




Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #114 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Chris Hanson <cph@debian.org>
To: jdthood@aglu.demon.nl
Cc: 247734-submitter@bugs.debian.org, Joshua Kwan <joshk@triplehelix.org>
Subject: Chris Hanson's opinion sought
Date: Thu, 10 Jun 2004 12:04:12 -0400
   Date: Fri, 04 Jun 2004 12:08:02 +0200
   From: Thomas Hood <jdthood@aglu.demon.nl>

   Chris Hanson is one person whose opinion I would like to hear.
   He maintains laptop-net and has to support the relatively
   complicated case of two laptops that roam together from one
   network to another.

I think you mean "one laptop with two interfaces".  :)

   Chris: Please read #247734.  The basic question is: What should
   be on the default "127.0.0.1" line in /etc/hosts?

   If it is the case that no setup works with every program, then
   what has to give?  Do we tell the mail programs to use something
   other than "hostname --fqdn" for building message i.d.'s?   Do
   we tell roaming users to update their /etc/hosts dynamically?
   Do we fix sudo et al so that they don't need to look up an IP
   address for the hostname?

I don't know what the right default should be.  On my own machine I
don't have anything other than "localhost" on that line.  But I don't
use sudo and I haven't looked at email sent from my machine to see if
the message ID comes out right.  And most of the time I am connected
to some network.

Doing the right thing means examining each situation and deciding on
the appropriate behavior when the only NIC is the loopback.  I don't
see any way that a loopback FQDN line could be "right", but it might
be expedient.  And I suspect that there will be additional issues that
come to light, particularly when there are two active network
interfaces.

This kind of analysis is inappropriate for sarge, so I think that the
most expedient thing should be done.



Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #117 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: joshk@triplehelix.org (Joshua Kwan)
To: Thomas Hood <jdthood@aglu.demon.nl>
Cc: 247734-submitter@bugs.debian.org
Subject: Re: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Fri, 11 Jun 2004 10:02:13 -0700
[Message part 1 (text/plain, inline)]
On Tue, Jun 08, 2004 at 10:20:21PM +0200, Thomas Hood wrote:
> I append the most credible answer I've received so far to my query
> on debian devel.
> 
> The conclusion I draw is that the initial hosts file should be:
> 
>     127.0.0.1	localhost.localdomain	localhost	pingo
> 
> where 'pingo' is the hostname.  If the machine has a static
> interface then it should be, instead:
> 
>     127.0.0.1	localhost.localdomain	localhost
>     10.11.12.1	pingo

Very good. So we'd use the first one for DHCP interfaces as well?

Now, looking towards the future, what if we choose to allow the user to
configure multiple interfaces statically at the same time? What will we
set for those IP adresses?

-- 
Joshua Kwan
[signature.asc (application/pgp-signature, inline)]

Tags added: pending Request was from joshk@triplehelix.org (Joshua Kwan) to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #122 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: Joshua Kwan <joshk@triplehelix.org>
Cc: 247734-submitter@bugs.debian.org
Subject: Re: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Sat, 12 Jun 2004 09:59:00 +0200
On Fri, 2004-06-11 at 19:02, Joshua Kwan wrote:
> On Tue, Jun 08, 2004 at 10:20:21PM +0200, Thomas Hood wrote:


> >     127.0.0.1	localhost.localdomain	localhost	pingo


> >     127.0.0.1	localhost.localdomain	localhost
> >     10.11.12.1	pingo


> Very good. So we'd use the first one for DHCP interfaces as well?

I guess so.  But see below.


> Now, looking towards the future, what if we choose to allow the user to
> configure multiple interfaces statically at the same time? What will we
> set for those IP adresses?

One of the static IP addresses must be regarded as the "primary" one
and the hostname resolves to that.  I don't know whether or not the
other IP addresses need to appear in /etc/hosts.  If it _is_ useful
for them to appear there then arbitrary hostnames can be made up for
them.  E.g.,

    10.11.12.1	pingo
    10.11.12.2	pingo-10-11-12-2


On Fri, 2004-06-11 at 19:14, Joshua Kwan wrote: 
> Oh, and is this the specified domain, or literally localdomain?

A local domain of 'localdomain' is traditional.  I don't know if we
need it any more.  Perhaps 'localdomain' should be omitted until
such time as someone tells us that it's still needed for some reason.
For simplicity's sake it would be nice to get rid of it.


> And what if we do have a specified domain?
> 
> 127.0.0.1 localhost.localdomain localhost pingo.the.domain.org
> 
> or what?


On Fri, 2004-06-11 at 19:27, Pierre Machard wrote: 
> If you do have a specified domain, that means that you have a network
> available.
> 
> in that case, you should have 
[...]
> <card_ip> pingo.my.domain.tld pingo

Right.


On Fri, 2004-06-11 at 22:12, Joshua Kwan wrote: 
> Alright. It's committed. Check it out and see if I'm right, I hacked it
> up in between stuff for work.

OK

I think we should continue to consider the alternative of having:

    127.0.1.1	<hostname>

when there is no static IP address on a real interface which we can put
on this line instead of '127.0.1.1'.

The advantage of this configuration is that <hostname> is the canonical
host name for the interface one gets if one looks up <hostname>.

I don't think that there are any disadvantages.  All sudo wants is that
the hostname be resolvable; the address to which the hostname resolves
doesn't have to work.  There may be other programs that want to resolve
the hostname and also use it and for that reason it seems safest to 
make the hostname resolve to a 127.* address.  127.0.1.1 works as well
as 127.0.0.1 for many services: I have tried ping, telnet, ssh and
dnsmasq and they all work.  If there are services for which 127.0.1.1
doesn't work then our answer can be: "You shouldn't be talking to the
localhost through the IP address corresponding to the hostname, but to
the IP address corresponding to 'localhost'."
--
Thomas





Message sent on to pmachard@debian.org:
Bug#247734. Full text and rfc822 format available.

Message #125 received at 247734-submitter@bugs.debian.org (full text, mbox):

From: joshk@triplehelix.org (Joshua Kwan)
To: Thomas Hood <jdthood@aglu.demon.nl>
Cc: 247734-submitter@bugs.debian.org
Subject: Re: [Fwd: Re: /etc/hosts: Two lines with the same IP address?]
Date: Sat, 12 Jun 2004 22:37:22 -0700
[Message part 1 (text/plain, inline)]
On Sat, Jun 12, 2004 at 09:59:00AM +0200, Thomas Hood wrote:
> One of the static IP addresses must be regarded as the "primary" one
> and the hostname resolves to that.  I don't know whether or not the
> other IP addresses need to appear in /etc/hosts.  If it _is_ useful
> for them to appear there then arbitrary hostnames can be made up for
> them.  E.g.,
> 
>     10.11.12.1	pingo
>     10.11.12.2	pingo-10-11-12-2
> 

Perhaps. As the classic example, what if you want exim4 to only listen
on 10.11.12.2? It'd try to look that up, and stall if it can't.

(I think.)

> A local domain of 'localdomain' is traditional.  I don't know if we
> need it any more.  Perhaps 'localdomain' should be omitted until
> such time as someone tells us that it's still needed for some reason.
> For simplicity's sake it would be nice to get rid of it.

Red Hat always uses localhost.localdomain, even to this day. I just
checked out a RHAS 3 box at work. I guess it's good to jump on that
bandwagon.

> On Fri, 2004-06-11 at 19:27, Pierre Machard wrote: 
> > If you do have a specified domain, that means that you have a network
> > available.
> > 
> > in that case, you should have 
> [...]
> > <card_ip> pingo.my.domain.tld pingo
> 
> Right.

Will do.

> I think we should continue to consider the alternative of having:
> 
>     127.0.1.1	<hostname>
> 
> when there is no static IP address on a real interface which we can put
> on this line instead of '127.0.1.1'.
> 
> The advantage of this configuration is that <hostname> is the canonical
> host name for the interface one gets if one looks up <hostname>.
> 
> I don't think that there are any disadvantages.  All sudo wants is that
> the hostname be resolvable; the address to which the hostname resolves
> doesn't have to work.  There may be other programs that want to resolve
> the hostname and also use it and for that reason it seems safest to 
> make the hostname resolve to a 127.* address.  127.0.1.1 works as well
> as 127.0.0.1 for many services: I have tried ping, telnet, ssh and
> dnsmasq and they all work.  If there are services for which 127.0.1.1
> doesn't work then our answer can be: "You shouldn't be talking to the
> localhost through the IP address corresponding to the hostname, but to
> the IP address corresponding to 'localhost'."

This is a good solution too. Cleaner than the pingo-xx-xx-xx-xx deal,
IMHO. On the flip side, it sounds hackier, but works the same as
127.0.0.1 for all cases, I suppose.

Harder to code, though, especially once we get into multiple network
interfaces.

-- 
Joshua Kwan
[signature.asc (application/pgp-signature, inline)]

Reply sent to Joshua Kwan <joshk@triplehelix.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to pmachard@debian.org:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #130 received at 247734-close@bugs.debian.org (full text, mbox):

From: Joshua Kwan <joshk@triplehelix.org>
To: 247734-close@bugs.debian.org
Subject: Bug#247734: fixed in netcfg 0.69
Date: Tue, 15 Jun 2004 18:02:05 -0400
Source: netcfg
Source-Version: 0.69

We believe that the bug you reported is fixed in the latest version of
netcfg, which is due to be installed in the Debian FTP archive:

netcfg-dhcp_0.69_i386.udeb
  to pool/main/n/netcfg/netcfg-dhcp_0.69_i386.udeb
netcfg-static_0.69_i386.udeb
  to pool/main/n/netcfg/netcfg-static_0.69_i386.udeb
netcfg_0.69.dsc
  to pool/main/n/netcfg/netcfg_0.69.dsc
netcfg_0.69.tar.gz
  to pool/main/n/netcfg/netcfg_0.69.tar.gz
netcfg_0.69_i386.udeb
  to pool/main/n/netcfg/netcfg_0.69_i386.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 247734@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joshua Kwan <joshk@triplehelix.org> (supplier of updated netcfg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 15 Jun 2004 14:34:25 -0700
Source: netcfg
Binary: netcfg-static netcfg-dhcp netcfg
Architecture: source i386
Version: 0.69
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Joshua Kwan <joshk@triplehelix.org>
Description: 
 netcfg     - Configure the network (udeb)
 netcfg-dhcp - Configure the network via DHCP (udeb)
 netcfg-static - Configure a static network (udeb)
Closes: 247734 248147 253086 253099 253361
Changes: 
 netcfg (0.69) unstable; urgency=medium
 .
   * Sylvain Ferriol
     - fix error message during plip config. (Closes: #253361)
   * Christian Perrier
     - Remove trailing exclamation mark from netcfg/dhcp_success_note
     - Run debconf-updatepo and unfuzzy templates for removed exclamation mark
   * Joshua Kwan
     - Corrected reference to the pppconfig package. (Closes: #253086)
     - killall.sh: add grep -v grep (Closes: #253099)
     - Allow netcfg/disable_dhcp option that governs what use_dhcp is
       set to every time we start, instead of hardcoding true. Defaults
       to true, so default behavior has not changed. (Closes: #248147)
     - Fix /etc/hosts writing after much deliberation. (Closes: #247734)
     - Use a static buffer for mii-diag call.
     - Sleep for 1.5 seconds before mii-diag, because slow network cards
       just take that long to answer. And for those that take more that's
       just too bad.
   * Bastian Blank
     - Readd postinst files for netcfg-dhcp and netcfg-static.
   * Updated translations:
     - Bosnian (bs.po) by Safir Šećerović
     - German (de.po) by Alwin Meschede
     - Hebrew (he.po) by Lior Kaplan
     - Polish (pl.po) by Bartosz Fenski
Files: 
 1f4f445b201837e09519996e6f984d59 1526 debian-installer optional netcfg_0.69.dsc
 0f6c26fd1e22e49cdfd8598c37807a4c 164920 debian-installer optional netcfg_0.69.tar.gz
 00aba0fcc8c332b467e2d6dd9b93ea9a 133408 debian-installer optional netcfg_0.69_i386.udeb
 b45a912313f920d8883f11958178eea9 102358 debian-installer optional netcfg-dhcp_0.69_i386.udeb
 6aa768786cb1473f0a7e9a97a71e41c5 109560 debian-installer optional netcfg-static_0.69_i386.udeb
package-type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: http://triplehelix.org/~joshk/pubkey_gpg.asc

iQIVAwUBQM9s4qOILr94RG8mAQKNmw/+INYUPYmQ00U8MkfuaapWNd/4xhPg5YJv
Y4s5rQkSkAmee+Bhwv/jYgkZFiwtDIB/VruwkfQWx6HrQYhkJFP5aBO7Fkz0NB5A
a/KWrpos//i4dOyzTu3nGucvO+WvGldoUwfkY0j6QDLSKiCN60NhSp7LyJbGMYP0
Z8QPCvzqPAck1Dk8UlXi9oD03R4cEmh74Zv40kbqVttbY+CFS4q+MXiE6YBHiVi+
UUxkfaAalj/fBmRicbrz5hYeD1ySOldweWw8w6E/055vfnFn6Y7jG/7yViZmw9gU
uCrO1Lh2pYv919ayjI4qfuZeyo6QL806TfYrRKzfloXGcs+yV29o6VdUH0Z6/+84
lp+jz3ypJ2IaYrnetnCrLN5MCA6umZvV9DDtxK0rzBwGxw9a5X9L8kDyoPMxJstA
L1rC9vMR8z2+IXePMqIA26X6SJ9N+5dCOeziUoeHrsPv6Z6qLqHbn5wfMKIxFiBg
iJk3haxyNPktmN6Zne3WlUeFbO8EpOEq2SoDe5FG+m5ZrLZJ6h7JqrAj/oslnoMu
5AGr2B/rEsZN2SD3cciSxKHcm6zC97BakHy3Sjbt96WDPKCLLaWuOoyjEBAk9tvL
d0EQnpvyjq424b+FAnt+hHFiUaprKw14loEPPn5JekxfdXOtVuU6RBreuAyd4BFo
N2YCXlF5cE0=
=VUn/
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 10:57:07 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.