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

Re: libnss-myhostname instead of mangling /etc/hosts



Hi joey,

Am Sonntag, den 13.06.2010, 10:59 -0400 schrieb Joey Hess:
> Joachim Breitner wrote:
> > Would this be something that could be used by default in Debian, maybe
> > for squeeze+1? 
> 
> You're suggesting making the package standard priority. This is not a
> decision within the purvue of the d-i team, really.

that’s of course a valid point. I’ll therefore move the suggestion to
d-devel. Here is my original mail again:

> at the moment, the Debian installer creates a /etc/hosts file
> containing the local host name¹, so that this name is resolvable even
> if not registered in the DNS. Unfortunately, this is a possible cause
> of problems when the user wants to change the hostname – he has to
> change it in /etc/hosts two.
> 
> Lennart Poetting’s libnss-myhostname² works around this issue. Instead
> of hard-coding the hostname in /etc/hosts, this nss module resolves
> the current local host to 127.0.1.1. It also works with ipv6.
> 
> Would this be something that could be used by default in Debian, maybe
> for squeeze+1? 
> 
> Pros:
>  * Renaming a host does not affect /etc/hosts.
>  * /etc/hosts is the same on all installation and can be made a
> regular static conffile shipped by some base package, instead of being
> created by netcfg during installation.
> 
> Cons:
>  * Another nss module that has to be loaded.
>  * More code involed in a very common procedure that might contain
> bugs (but these will eventually all be fixed, I assume).
> 
> 
> What do you think?


OTOH, maybe libnss-myshostname does not have to be priority standard.
Instead, /etc/hosts could be shipped without the local hostname and
packages that are known to require the hostname to be resolvable can
just depend on it. Advantage is that only installations that really
require the feature need to install the package. Disadvantage is that
the admin can not easily remove it and do the /etc/hosts setting
manually. Maybe a case for a Recommends?

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: