Remove target resolv.conf before proceeding.
This commit is contained in:
parent
027ba074ed
commit
a1c4c23051
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user