resolv.conf logic for broken symlink

Bug #1649881 reported by Viacheslav Ostroukh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wicd
New
Undecided
Unassigned

Bug Description

I had a problem while migrating from NetworkManager to wicd (Gentoo Linux, wicd-1.7.4-r2). The source of a problem was following:

- after removal of NetworkManager resolv.conf was a symlink to /run/NetworkManager/resolv.conf
- after start of wicd it was backed up as /var/lib/wicd/resolv.conf.orig
- after reboot it was successfully restored
- symlink now points to nonexistent file in nonexistent location. Wicd can't write DNS information there. Even if /etc/resolv.conf is deleted and wicd successfully reconnects, broken symlink is restored after reboot.

Fix is extremely simple: remove /var/lib/wicd/resolv.conf.orig symlink. Though, it may be makes sence to improve logic for storing original resolv.conf for omitting such a problem for less advanced users.

Revision history for this message
Axel Beckert (xtaran) wrote :

Hi,

> - after removal of NetworkManager resolv.conf was a symlink to /run/NetworkManager/resolv.conf

That sounds rather like a bug in Gentoo's NetworkManager package to me than in wicd. Any cruft generated by a package/ebuild upon installation should be removed again upon package/ebuild removal.

Fixing in in wicd may though help.

Revision history for this message
Viacheslav Ostroukh (slavoutich) wrote :

Hi Axel,

...or it is a shameless NetworkManager's problem, and not Gentoo package, don't know. Though, my claim that more careful behaviour with resolv.conf backup would may be useful (see, for example, bug #1132529). But I trust you, holy developers, and hope that you know better how this application should behave! :)

Revision history for this message
full name (nullname) wrote :

I do not think it is networkmanager's problem,
i can recreate this bug like that :
install both networkmanager and wicd
start up networkmanager
start up wicd

stop networkmanager
wicd fails to stop because it gets confused by symlink already

then it's no longer networkmanager's fault. wicd will restore failed symlink from backup forever
and will bail out because cannot operate on it.

also if you remove it manually and create new one, it cannot stop because it cannot modify .orig symlink...

solution is indeed dead simple but i think wicd should just not create backup if it's a symlink .

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.