wicd daemon fails to start if /etc/resolv.conf is a relative symlink
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wicd |
New
|
Undecided
|
Unassigned |
Bug Description
wicd version 1.7.2.4-4, Ubuntu 13.04 amd64
Traceback (most recent call last):
File "/usr/share/
main(sys.argv)
File "/usr/share/
os.
OSError: [Errno 17] File exists
I have a fresh install of Ubuntu 13.04, and /etc/resolv.conf is symlinked to "../run/
When wicd-daemon.py checks if it has backed this file up, it uses "os.path.exists" on the backup location.
os.path.exists returns False for broken symlinks.
The location "../run/
Thus wicd-daemon.py assumes there is nothing there and tries to write to it, when in fact there is a (correctly backed up, but broken) symlink there.
relevant section of code:
"""
# back up resolv.conf before we do anything else
try:
# don't back up if .orig exists, probably there cause
# wicd exploded
print wpath.varlib
if not os.path.
if os.path.
else:
except IOError:
print 'error backing up resolv.conf'
"""
suggested fix:
- if not os.path.
+ if not os.path.
+ and not os.path.
or something like that.
Related branches
- Pieter Leclerc (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedwicd/wicd-daemon.py (+1/-1)
description: | updated |
description: | updated |
the suggested fix works for me.