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

Thu Oct 29 19:00:50 UTC 2009
Meenoo Shivdasani <meenoo at gmail.com>

> /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
    DYNCONFIG=true
fi

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."
    else

> 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.

HTH,

M