networkcfg needs to copy resolv.conf in the chroot.

This commit is contained in:
shainer 2016-07-10 15:29:49 +01:00
parent 9d4a636a16
commit a45f78e9ac

View File

@ -53,4 +53,13 @@ def run():
except FileExistsError:
pass
# We need to overwrite the default resolv.conf in the chroot.
source_resolv = "/etc/resolv.conf"
target_resolv = os.path.join(root_mount_point, "etc/resolv.conf")
if os.path.exists(source_resolv):
try:
shutil.copy(source_resolv, target_resolv)
except FileNotFoundError:
libcalamares.utils.debug("Can't copy resolv.conf from {}".format(source_resolv))
return None