I have about a hundred RedHat machines (RHEL4). I need to change /etc/hosts on each of them. However, I've found that after I change them manually, sometimes they forget the changes and revert to the old file. I'm not sure, but it looks like it's being overwritten on boot by the contents of /etc/sysconfig/networking/profiles/default/hosts, which is apparently normally accessed through the system-config-network programs. But sometimes when I edit /etc/hosts, that file is automatically updated.
What I'd like to know is how to make sure that that file gets updated, and, preferably, how it sometimes gets updated automatically. I'm sure that if I use the system-config-network GUI it'll get updated properly, but I don't really relish the hours that it will take to click through all hundred or so machines, when a script would take me about five minutes to write and five minutes to run, if that. I might be able to use the system-config-network-cmd app to export, modify, then import the, for lack of a better word, registry, but I've done that before with other things and I find that it often causes RedHat to think that its hardware has changed on reboot, which is irritating at the least, so I'd rather avoid that, if possible.
Also, just to let you know: I really f'n hate RedHat.
_________________________
Bitt Faulk