Re: [Hampshire] resolv.conf overwritten by dhcp

Top Page

Reply to this message
Author: Jim Kissel
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] resolv.conf overwritten by dhcp


Jim Kissel wrote:
> The title says it all. I've tried
>
> 1) prepend domain-name-servers .....; # dhclient.conf
> 2) supersede domain-name-servers ......; # dhclient.conf
> 3) removing 'mv -f $new_resolv_conf /etc/resolv.conf'
> from dhclient-scripts
>
> but after 10/15 minutes after restarting the network, some process comes
> along and clobbers resolve.conf with the local ISP's settings for the
> nameserver.
>
> Similar problem has been reported on launchpad and several other places,
> but so far, I can't seem to find a reasonable work-a-round.


Don't you just hate people that answer their own posts?

There are two copies of dhclient-script in Ubuntu 7.04. The obvious one
in /etc/dhcp3 and the not so obvious in /sbin If you comment out the
'mv -f $new_resolv....' in the /sbin version, and restart you network,
it would appear that this will stop resolv.conf being overwritten.

YMMV