Linux Server Administration

Monday, November 25, 2013

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.

Posted by linux admin at 10:35 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
View mobile version
Subscribe to: Posts (Atom)

About Me

linux admin
View my complete profile

Blog Archive

  • ►  2015 (53)
    • ►  April (15)
    • ►  March (38)
  • ▼  2013 (26)
    • ▼  November (1)
      • DHCP client overwriting resolv.conf how to stop it...
    • ►  October (2)
    • ►  September (1)
    • ►  August (4)
    • ►  July (2)
    • ►  June (5)
    • ►  May (1)
    • ►  April (7)
    • ►  March (2)
    • ►  February (1)
  • ►  2012 (54)
    • ►  December (1)
    • ►  November (1)
    • ►  October (6)
    • ►  September (3)
    • ►  August (3)
    • ►  July (7)
    • ►  June (3)
    • ►  May (7)
    • ►  April (4)
    • ►  March (2)
    • ►  February (9)
    • ►  January (8)
  • ►  2011 (225)
    • ►  December (7)
    • ►  November (6)
    • ►  October (4)
    • ►  September (2)
    • ►  August (10)
    • ►  July (9)
    • ►  June (16)
    • ►  May (26)
    • ►  April (23)
    • ►  March (16)
    • ►  February (106)
Simple theme. Powered by Blogger.