Brian wrote:
> Bob Proulx wrote:
> > Brian wrote:
> > > True. What do think about the lack of '127.0.1.1 localhost' in 

It is the "127.0.1.1 localhost" to which I was disagreeing.  That
would be unusual.  It is still the loopback device so off the top of
my head I think everything should still work okay.  But for best
compatibilty I think 127.0.0.1 should always be localhost the reverse.

If the actual hostname of the system is "localhost" then there is no
need for any other entry other than the 127.0.0.1 entry and the
127.0.1.1 entry isn't needed at all.  (Now I need to verify that the
installer doesn't add it in that case.  I recall that it does not.)

> > > etc/hosts? Squeeze and Wheezy installs would both put this line in.
> > 
> > Process check!  I think you have mixed up the two cases.  Since a long
> > time now Debian installs a /etc/hosts file that will look like this:
> > 
> >   127.0.0.1       localhost
> 
> Agreed.
> 
> >   127.0.1.1       foo.example.com        foo
> 
> Agreed - sort of :).
> 
> A line in /etc/hosts has the form
> 
>    IP_address canonical_hostname [aliases...]
> 
> aliases are optional and the second field will always be the canonical
> hostname.

So far so good! :-)

> What a Debian install puts for 127.0.1.1 depends on how the install took
> place. If the user just uses 'install' d-i can get /etc/hostname and the
> domain name from whatever dhcp server is being used.

Hmm...  I hadn't thought about an odd DHCP configuration creating
something unusual there.  I am still suspicious...  I think it works
the same regardless.

>    127.0.1.1       foo.example.com        foo
> 
> is what the user could get.

Since I usually install things in what I consider a "normal" state I
completely agree.  That is what you would get.

Now that you mentioned the case of what happens if DHCP returns
something unusual I think I would need to check.  But I think it still
behaves the same regardless.  I don't think anything the DHCP server
returns is going to affect this.  But I can't say for certain without
looking and testing.  It might.

I am more interested now in what happens in a CD#1 install completely
offline.

> Suppose the server doesn't provide a domain name. Then she will have
> 
>    127.0.1.1       foo
> 
> because there is no need for an alias.

That is a good question!  But doesn't the installer ask you for a
domain name specifically?  I believe it does.  Therefore the user
should always enter a domain name.  But if they don't then I don't
know what the installer puts there by default.

I _thought_ the installer put the special "localdomain" string there
in the case that the user left it empty.  Because sometimes there
isn't any reasonable thing to put there.  In that case it creates a
consistent and valid configuration using localhost and localdomain.
That way applications that require a domain name to be present will
have a constructed one that will work even if bogus.  (As I recall
this predates RFC 2606 which created a .localhost domain.)

The idea is that some applications such as Postfix for one example,
along with others, that really want a fully qualified hostname can
have a fully consistent configuration by using localhost.localdomain.
The localdomain part is a created construct.  But on an unconnected
system everything can map consistently and everything can work
regardless.

> For an expert install the hostname and domain name can be specified, so
> either
> 
>   127.0.1.1       foo.example.com        foo
> 
> or, if the domain name is left blank,
> 
>   127.0.1.1       foo
> 
> would be seen.

Doesn't it create an entry like this?  I will need to test it in order
to see what it creates in that case.

  127.0.1.1       foo.localdomain  foo

I will try it later and report back.  :-)

> With preseeding the hostname can be be preseeded but not the domain
> name. So I'd expect both the previous two variants to be possible.

The domain *can* be preseeded.  I do that all of the time.  Really!
On the install command line.  For me usually through the PXE network
boot syslinux interface.

  hostname=junk domain=proulx.com

> I do not think we are in serious disagreement.

Sometimes we disagree but it is never serious.  I always look forward
to your postings Brian.  They are always high quality helpful
postings.  I enjoy our discussions.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to