Hi,

Den 2012-10-07 06:24:02 skrev Eelco Dolstra <eelco.dols...@logicblox.com>:

> Hi,
>
> On 05/10/12 13:11, Rickard Nilsson wrote:
>
>> Is there some particular motivation behind the /etc/hosts generation?  
>> Why
>> should the hostname always be mapped to 127.0.0.1? I think it is wrong,
>> simply.
>
> The reason is that some software assumes that the hostname resolves to a  
> valid
> IP address.  However, a better solution is to use nss-myhostname [1],  
> which I'm
> currently testing.  It makes the hostname resolve to the IP addresses of  
> your
> network interfaces, or ::1 / 127.0.0.2 as a fallback.
>
> [1] http://0pointer.de/lennart/projects/nss-myhostname/

nss-myhostname sounds like a good idea. I just wonder what happens when  
you have several network links configured, and want your hostname to  
resolve to one of those IPs. The documentation for nss-myhostname says  
"nss-myhostname simply returns all locally configure public IP addresses".  
I'm not sure what would happen in the nfsd case, would rpc-nfsd bind to  
all local IPs (which would basically be the same as 0.0.0.0), or would it  
pick the first one returned by nss-myhostname?

   / Rickard
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to