[TriLUG] Modification of /etc/hosts

Brian Weaver cmdrclueless at gmail.com
Wed Feb 3 10:24:43 EST 2010


So I'm trying to figure out what program is modifying my /etc/hosts
file and I'm not having any luck.

I'm effectively running a CentOS 5 system and when the system comes up
none of the ethernet adapters are started by design. I log onto the
console and configure the ethernet adapter to get its address via
DCHP. When a 'service network restart' is preformed the box gets an IP
address and the hostname is set by the dhclient scripts to the address
returned by DCHP.

Most name resolution works because dhclient updates the resolv.conf
file. However Java 6 is being difficult and doesn't want to work. The
reason is that dhclient updates the hostname of the box, but the
corresponding line is not in the /etc/hosts. At some point, I"m not
sure when a process updates the /etc/hosts file to add the missing
line. I can't figure out what process is modifying the hosts file. I
spent a lot of time looking at the dhclient scripts but that turned
out to be a dead end.

Anyone have any ideas where to look or what is updating the ifle. I"d
like to know so I can trigger it right after the network is restarted.

Thanks

-- Brian

-- 

/* insert witty comment here */



More information about the TriLUG mailing list