Linux tip, Fedora tip / howto: resolv.conf gets overwritten, slow name lookups
Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.
resolv.conf gets overwritten, slow name lookupsI have my desktop set up to get an IP from my router using DHCP. Apparently /sbin/dhclient-script overwrites my /etc/resolv.conf (the first line says "; generated by /sbin/dhclient-script"), and, even though I had nothing listed for the DNS search path in the appropriate entry of system-config-network, dhclient-script still puts the line:
in my /etc/resolv.conf. I am not sure if this affects the time to do a name lookup (if you do know, send me a note!).
To prevent resolv.conf from being overwritten, edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 (assuming this is for a wired network on your first/single network interface), and make sure the line with PEERDNS says:
Alternatively, you can fire up system-config-network, select eth0, click Edit → General, and make sure the option "Automatically obtain DNS information" is unchecked.
Another note: if system-config-network fails to run with some kind of "An unhandled exception has occurred" error, you're probably not running haldaemon: start it using:
Send me your comments!Something didn't work as expected? You'd like to add some useful info to this tip? Use the form below to send me your comments. (Don't forget to fill out the super-lame CAPTCHA below..)