[TriLUG] Modification of /etc/hosts
David Brain
dbrain at gmail.com
Thu Feb 4 08:05:43 EST 2010
Hi,
Just quickly looking at our rhel systems here it looks like the dhcp
client will set the hostname (it calls 'hostname' so it will set it
without modifying the /etc/hosts) I can see that upsetting Java which
tends to be picky about hostnames for some things. You could probably
dig around in various init scripts and discourage it from doing that.
David
On Wed, Feb 3, 2010 at 10:24 AM, Brian Weaver <cmdrclueless at gmail.com> wrote:
> So I'm trying to figure out what program iis 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 */
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ : http://www.trilug.org/wiki/Frequently_Asked_Questions
>
More information about the TriLUG
mailing list