1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-03 12:24:14 +01:00

Merge "Javier P.L. 2013-12-06 allow wicd daemon to start even if /etc/resolv.conf is a relative symlink"

https://code.launchpad.net/~chilicuil/wicd/wicd/+merge/198057

Bugreports:
https://bugs.launchpad.net/wicd/+bug/1193856
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691973
https://bugs.launchpad.net/wicd/+bug/1171296
This commit is contained in:
Tom Van Braeckel
2014-12-11 14:50:12 +01:00

View File

@@ -1785,9 +1785,9 @@ def main(argv):
# back up resolv.conf before we do anything else
try:
backup_location = wpath.varlib + 'resolv.conf.orig'
# don't back up if .orig exists, probably there cause
# wicd exploded
if not os.path.exists(backup_location):
# Don't back up if the backup already exists, either as a regular file or a symlink
# The backup file should have been cleaned up by wicd, so perhaps it didn't exit cleanly...
if not os.path.exists(backup_location) and not os.path.islink(backup_location):
if os.path.islink('/etc/resolv.conf'):
dest = os.readlink('/etc/resolv.conf')
os.symlink(dest, backup_location)