Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks for the link proving my assumption and I look forward to the change in RHEL 6; I think that's better. –  deuberger Aug 8 '12 at 12:56
add comment

You're correct that anaconda is responsible for creating this file. See /usr/lib/anaconda/network.py for details.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.