Skip to content
Snippets Groups Projects
Commit 4ed06d4f authored by Teo Mrnjavac's avatar Teo Mrnjavac Committed by Philip Müller
Browse files

Remove target resolv.conf before proceeding.

parent ec2094d7
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,10 @@ def run():
source_resolv = "/etc/resolv.conf"
target_resolv = os.path.join(root_mount_point, "etc/resolv.conf")
if source_resolv != target_resolv and os.path.exists(source_resolv):
try:
os.remove(target_resolv)
except FileNotFoundError:
libcalamares.utils.debug("Couldn't remove {}".format(target_resolv))
try:
shutil.copy(source_resolv, target_resolv)
except FileNotFoundError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment