mirror of
https://github.com/gryf/wicd.git
synced 2025-12-25 07:32:29 +01:00
Fix error when trying to overwrite existing /etc/resolv.conf with the backup
This commit is contained in:
@@ -1802,6 +1802,7 @@ def main(argv):
|
||||
backup_location = wpath.varlib + 'resolv.conf.orig'
|
||||
if os.path.islink(backup_location):
|
||||
dest = os.readlink(backup_location)
|
||||
os.remove('/etc/resolv.conf')
|
||||
os.symlink(dest, '/etc/resolv.conf')
|
||||
else:
|
||||
shutil.move(backup_location, '/etc/resolv.conf')
|
||||
|
||||
Reference in New Issue
Block a user