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

Dave tdbtdb+centos at gmail.com
Thu Oct 8 22:39:43 UTC 2009

On Thu, Oct 8, 2009 at 11:27 AM, Meenoo Shivdasani <meenoo at gmail.com> wrote:
> /etc/init.d/network calls /etc/sysconfig/network-scripts/ifup which
> calls /sbin/dhclient which calls /sbin/dhclient-script which
> overwrites your resolv.conf with the info it gets from the DHCP server
> on the network.

How would I find this out on my own? And it seems not to be correct.
At least, if /etc/sysconfig/network-scripts/ifup calls
/sbin/dhclient, it must use some indirection, as dhclient is not
mentioned in the script explicitly:

grep -i dhc /etc/sysconfig/network-scripts/ifup
if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then

Why does it overwrite /etc/resolv.conf when the machine is not set to
use DHCP? The IP address etc. is set statically using


More information about the CentOS mailing list