mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
Remove target resolv.conf before proceeding.
This commit is contained in:
parent
37384279e5
commit
567ac87440
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@ def run():
|
||||||
source_resolv = "/etc/resolv.conf"
|
source_resolv = "/etc/resolv.conf"
|
||||||
target_resolv = os.path.join(root_mount_point, "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):
|
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:
|
try:
|
||||||
shutil.copy(source_resolv, target_resolv)
|
shutil.copy(source_resolv, target_resolv)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue