[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with DSL and /etc/resolv.conf



On Sat, 19 Feb 2005 17:20:05 +0100, Gordon Farquharson wrote:
> This solution assumes that you are using dhclient for your DHCP client. 
> If you create a file called dhclient-enter-hooks in /etc, you can then 
> change the way dhclient modifies your resolv.conf file (man 
> dhclient-enter-hooks). My dhclient-enter-hooks file looks like this:
> 
> make_resolv_conf() {
>          echo nameserver xxx.xxx.xxx.xxx | resolvconf -a eth0
> }
> 
> where xxx.xxx.xxx.xxx is the IP number of the ISP nameserver.
> 
> I use the utility resolvconf to manage my resolv.conf file, but if you 
> don't then you could do something like:
> 
> make_resolv_conf() {
>          echo nameserver xxx.xxx.xxx.xxx > /etc/resolv.conf
> }
> 
> I haven't check that this works when the DHCP lease expires and is 
> renewed, but I assume that it will.
> 
> I hope this helps others with this problem.


Note that resolvconf supports both dhcp-client and dhcp3-client out of the
box now; no need to write one's own scripts like this.

-- 
Thomas Hood



Reply to: