[CentOS] resolv.conf rewritten every reboot. How to figure out who and why?

Meenoo Shivdasani meenoo at gmail.com
Thu Oct 29 20:00:50 UTC 2009

> /etc/sysconfig/network-scripts/ifup-eth:    BOOTPROTO=bootp

> So, it's not PEERDNS, not DHCP, not NetworkManager. Why is dhclient-script
> even being run?

BOOTPROTO=bootp is triggering it.

In /etc/sysconfig/network-scripts/ifup-eth:

if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then

Then, later on in that script:

if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then

do a bunch of stuff related to dynamically assigned addresses and names.

And finally:

    if /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then
        echo $" done."

> Maybe I should disable selinux altogether, instead of just making it
> permissive? I think I'll try that.

selinux shouldn't have anything to do with the resolv.conf file being
rewritten -- unless it's set to enforcing and something that isn't
allowed to do so is trying to rewrite the file.



More information about the CentOS mailing list