hostname doesn't stick

jdow jdow at earthlink.net
Sun Sep 17 09:54:05 UTC 2006


I installed FC5 with the instructions that data was to come via
DHCP. So the hosts file has one line of data in it plus the two
text lines of dross.
127.0.0.1  <and so forth>

Since the address is stored no other place the network startup
process must look SOMEWHERE for the address. So that's the hosts
file. I still see admonitions not to change the local hosts line.
So I'd expect it to be there. But unless somebody got just plain
lazy the first line that is NOT localhost or comment should be
the algorithmic choice for the machine's address. And even that is
a cheat since /etc/sysconfig/network includes the host name. So
the hosts file can be searched, by bog standard name lookup calls,
to find the address for the machine as you bring it up.

So something like
"
192.168.0.1 spoo.mylocal.domain
127.0.0.1  localhost.local.domain localhost
192.168.0.10 fubar.mylocal.domain
"
should work nicely for a host file for a machine named in the network
file "fubar.mylocal.domain" with real name lookups used. A cheap bash
script might be a different pile of poop.

{^_-}   Joanne




More information about the fedora-list mailing list