Tuesday, November 26, 2013
1:35 PM

DHCP client overwriting resolv.conf how to stop it on linux

prevent resolv.conf updates only, the fastest way is to redefine the function to do nothing:
create flowing file 
# cat /etc/dhclient-enter-hooks
make_resolv_conf() {
exit 0
}
Then save the file and ensure it is executable:
# chmod a+x /etc/dhclient-enter-hooks
Note that, as explained in the man page, the dhclient-script is not standard so if this configuration doesn’t work, please read the man page.

0 comments:

Post a Comment