resolv.conf circular symlinks

Forum memeber disciple posted this to the forum recently:

This is a problem that seems to have been around for at least four years, although I think normally the people who report it are connecting with adsl modems rather than through an ethernet card to a router with DHCP.

The last time I saw it reported was for 4.3 beta 1 or release candidate 1 or something, and I didn't see any report that it was fixed. My experience is with 4.1.1:
I installed Puppy on a friend's USB drive, and we played around with it on a computer at work. He then took it home and had to rerun the network wizard, and then brought it back to work and reran the network wizard, and then took it home and couldn't connect to the internet even after running the network wizard. The reason is that /etc/resolv.conf had somehow been replaced by a link to /etc/ppp/resolv.conf, which itself is a link to /etc/resolv.conf. On both computers we are connecting via ethernet to a router with DHCP. My friend is completely new to Linux so wasn't messing around with configuration files or anything, so somehow the gui wizard scripts or something must be at fault.

What I want to know is:
1. Does anyone have any idea why this problem would occur occasionally, or what is causing it?
2. Does anyone know if it has by any chance been fixed in 4.3?
3. Does anyone know a reason why the network setup wizard shouldn't delete the two resolv.conf files / links (or rename them with a .bak or something) to make sure they can be created properly?


In the Roaring Penguin pppoe package, I modified /usr/sbin/pppoe-setup back in July 2008:

    #v4.00 BK if enter 'server', somehow /etc/resolv.conf gets changed to a

#symlink to /etc/ppp/resolv.conf (which is a symlink to /etc/resolv.conf)
#so it's a circle. This script does not do that, something else does if it
#sees /etc/resolv.conf is empty. A workaround is to put something into it,
#what I have done is put in a free name server:
if [ "$DNS1" = "server" ];then
[ "`grep '^nameserver' /etc/resolv.conf`" = "" ] && echo 'nameserver 208.67.222.222' >> /etc/resolv.conf
fi


I never did find out what actually causes the circular symlink problem.

However, my comment does indicate a possible solution, or at least a workaround. It all hinges on my comment "something else does if it sees /etc/resolv.conf is empty". If that is correct, then perhaps all I need to do is have a comment in resolv.conf, like this:

# nameservers go in here

I'm very nervous messing around with such a vital file at this stage, when 4.3.1 is imminent, but this possible fix is worth a try. Well, there will be a 4.3.1-RC, so give the network setup a good test, make sure that a pre-existing comment in resolv.conf doesn't break anything. I can't see why, but you never know.

Um, but maybe whatever causes that bug needs to see an actual "nameserver" entry in the file? We shall see.


Posted on 9 Oct 2009, 15:41


Comments:

Posted on 9 Oct 2009, 20:07 by Leon
The same bug as in Puppy 47*
The resolv.conf circular symlinks is also one of the most annoying bugs in Puppy 47* releases when using pppoe to setup internet connection.


Posted on 1 Feb 2010, 8:38 by disciple
Resolv.conf circular links - still a problem in Puppy 4.3.1
It seems this problem still occurs in Puppy 4.3.1
http://www.murga-linux.com/puppy/viewtopic.php?p=388210#388210