Re: Problem with DSL and /etc/resolv.conf
Hi Andrew
I know your original posting is old (Oct 2004) and you have probably
solved the problem in some way by now, but I thought I'd post my
solution to your problem so that other may benefit from it.
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.
Gordon
Reply to: