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

2010-06-16 Thread Petter Reinholdtsen
[Joachim Breitner]
> What do you think?

To me, installing libnss-myshostname by default sound like a good
idea.  Perhaps only in the laptop task as a start?

Happy hacking,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2fld3vrw2g1@login2.uio.no



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

2010-06-16 Thread Thomas Hood
One reason for resolving the system hostname to 127.0.1.1 in an NSS 
service is that this allows us to list that service last on the "hosts:" 
line in /etc/nsswitch.conf, thus making 127.0.1.1 the resolved address 
of last resort, coming after addresses resolved via /etc/hosts and/or DNS.


Please see http://lists.debian.org/debian-glibc/2005/06/msg00173.html 
for one of the earlier discussions about this issue.

--
Thomas Hood


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4c18c3a1.7060...@gmail.com



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

2010-06-15 Thread Christoph Berg
Re: Joachim Breitner 2010-06-14 <1276516697.2751.7.ca...@kirk>
> > 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.

This sounds like an overly complicated solution to avoid user errors.
What about simply making /etc/init.d/hostname.sh warn if the hostname
isn't resolvable (locally)?

I wouldn't want a .so file pulled into every program I execute (isn't
that what nss does?) because some people cannot edit /etc/hosts.

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


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

2010-06-14 Thread Joachim Breitner
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
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata


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