Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
resolv.conf is overwritten on reboot
#1

Just a quick tip:

 

For those using DHCP clients, you will proably find that on reboots that your resolv.conf is overwritten. To stop this from happening you can:

 

 

For dhcpcd its easy, add the option -R to your command line:



Code:
# dhcpcd -R




 

You will need to find the configuration file to edit and add this option to (differs per distro).

 

For dhcp-client there is a couple of options, the best, imho is to create a file "/etc/dhcp-enter-hooks":



Code:
# /etc/dhclient-enter-hooks

make_resolv_conf() {
     echo "doing nothing to resolv.conf"
}




 

 

Thats it... have fun,..

Reply
#2
Nice tip znx :)
Reply
#3
Thank you once again for resolving something for me that was a small irritation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)