dhclient and your resolv.conf
I use a custom search domain (so I don't have to type out web-ster.com) to save me a lot of typing. The problem is that everytime I DHCP (or renew) it overwrites my /etc/resolv.conf with whatever the DHCP options are. I finally found a way to append on the search domain in Fedora. Simply create a file /etc/dhclient-exit-hooks file with these contents
echo "search web-ster.com" >> /etc/resolv.conf
Leave A Reply
- 4 Replies
Replies
June 23rd 2006 - jbeez
Or you can fix it properly by editing dhclient.conf and adding a supersede or prepend statement.
man 5 dhclient.conf ftw
May 30th 2007 - jbeez sucks
tried that b4 jbeez, fedora happily ignores that shit - you rock, man who posted this real working solution
October 25th 2011 - xxx
vi /etc/sysconfig/network-scripts/ifcfg-eth0 SEARCH="example.com sub1.example.com sub2.example.com"
October 25th 2011 - xxx