/etc/resolv.conf getting over written with dhcp

Darren Pilgrim list_freebsd at bluerosetech.com
Fri Jun 15 20:59:09 UTC 2012


On 2012-06-15 07:14, Eugene Grosbein wrote:
> 15.06.2012 19:09, Varuna пишет:
>
>> About 2***, so what are the conditions to be true to figure out that
>> /etc/resolv.conf has not changed?
>
> There is simple solution: create file /etc/dhclient-enter-hooks
> and override add_new_resolv_conf() there to do nothing:
>
> add_new_resolv_conf() {
>    return 0
> }
>
> Works just fine for my systems.

Or just add something like:

interface "eth0" {
         supersede domain-name "example.com.";
         supersede domain-name-servers 192.0.2.1;
}

To your /etc/dhclient.conf and make dhclient do the right thing.



More information about the freebsd-hackers mailing list