[arch-dev-public] Adding nss-myhostname to the base group

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sat Oct 27 00:46:17 EDT 2012

On 10/22/2012 10:38 AM, Tom Gundersen wrote:
> Hi guys,
> I'd like to suggest that we add nss-myhostname to the base group,
> enable it by default in /etc/nsswitch.conf and make 'filesystem'
> depend on it.
> This means that the admin no longer has to make sure that
> /etc/hostname and /etc/hosts are kept in sync, as nss-myhostname will
> make sure that the local hostname can always be resolved. In
> particular this means that most people can leave /etc/hosts unchanged
> so it should simplify the configuration of a basic Arch system.
> For more information see: <http://0pointer.de/lennart/projects/nss-myhostname/>.
> Cheers,
> Tom

This is nice while your configured internet connection works :)

At least under my scenario (behind a router), DNS setup to my ISP, If 
internet connection goes down, all programs that tries to resolve local 
hostname will "sleep" in connect(2) [called by getaddrinfo(3)], until 
reaches timeout.
I detected this while, while my internet conection fails, and I try to 
launch mc, it takes longer time, so adding back my hostname line to 
"hosts" workaround the issue.

Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

More information about the arch-dev-public mailing list