Linux-Noob Forums
resolv.conf is overwritten on reboot - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Network Problems (https://www.linux-noob.com/forums/forum-58.html)
+--- Thread: resolv.conf is overwritten on reboot (/thread-2451.html)



resolv.conf is overwritten on reboot - znx - 2005-08-31


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




resolv.conf is overwritten on reboot - xDamox - 2005-09-01

Nice tip znx :)



resolv.conf is overwritten on reboot - Corkster - 2006-06-04

Thank you once again for resolving something for me that was a small irritation.