This commit is contained in:
Gormogon 2015-06-14 07:04:52 -04:00
parent beb911863b
commit db7577b9f8
5 changed files with 23 additions and 15 deletions

View file

@ -35,17 +35,16 @@ def mount_partitions(root_mount_point, partitions):
# Create mount point with `+` rather than `os.path.join()` because
# `partition["mountPoint"]` starts with a '/'.
mount_point = root_mount_point + partition["mountPoint"]
fstype = partition.get("fs", "")
if fstype == "fat16" or fstype == "fat32":
fstype = "vfat"
libcalamares.utils.mount(
partition["device"],
mount_point,
fstype,
partition.get("options", "")
)
libcalamares.utils.mount(partition["device"],
mount_point,
fstype,
partition.get("options", ""),
)
def run():
@ -61,14 +60,14 @@ def run():
# Sort by mount points to ensure / is mounted before the rest
partitions.sort(key=lambda x: x["mountPoint"])
mount_partitions(root_mount_point, partitions)
mount_partitions(root_mount_point, extra_mounts)
fw_type = libcalamares.globalstorage.value("firmwareType")
if fw_type == 'efi':
mount_partitions(root_mount_point, extra_mounts_efi)
libcalamares.globalstorage.insert("rootMountPoint", root_mount_point)
# Remember the extra mounts for the unpackfs module
if fw_type == 'efi':
libcalamares.globalstorage.insert("extraMounts", extra_mounts + extra_mounts_efi)