Op 17-11-10 18:51, Chuck Lever schreef:
The hostname is added to localhost entries in /etc/hosts because some
applications require at least one entry with the local host's
hostname in /etc/hosts. When a system comes up with all of its
network interfaces offline and without any IP addresses assigned,
what else can be done?
Read /etc/hostname?
Adding "localhost" entries to /etc/hosts does nothing for applications
that require an entry with the hostname in /etc/hosts, *unless* the
hostname is "localhost". Now as Networkmanager (apparently) sets the
hostname to "localhost", I can see why Networkmanager wants to add
"localhost" to /etc/hosts afterwards. But hey, we might as well set the
hostname to everyone.loves.networkmanager, then add *that* to /etc/hosts
and run into problems.
Please note, that /etc/hosts has nothing to do with the hostname, it's
only a way to statically (and locally) add things to the resolver.
[...]
for the host is added to /etc/hosts, and then added back to the
localhost entries when all network interfaces are disabled.
I don't think adding or not adding them to /etc/hosts makes any
difference. I'd guess that calling sethostname() causes problems.
V.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html