How does /etc/hosts get created on RHEL 5.5? It's not owned by any RPM and if deleted, it doesn't reappear on reboot, so apparently it's not a service created it. Does anaconda create it by default maybe? I'm trying to figure out exactly when during the install it's created. I'm assuming it must be created by anaconda before installing the RPMs?
2 Answers
Yes for RHEL 5 /etc/hosts
is created by anaconda, see the anaconda source for details.
Later versions (RHEL 6) seem to use the setup.rpm to install /etc/hosts
.
-
Thanks for the link proving my assumption and I look forward to the change in RHEL 6; I think that's better. Aug 8, 2012 at 12:56
You're correct that anaconda is responsible for creating this file. See /usr/lib/anaconda/network.py
for details.