Fixed pep8 whining in module mount
Added myself to copyright
This commit is contained in:
parent
65b5d67a08
commit
33b5cefebb
@ -4,6 +4,7 @@
|
|||||||
# === This file is part of Calamares - <http://github.com/calamares> ===
|
# === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
#
|
#
|
||||||
# Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
# Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
|
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||||
#
|
#
|
||||||
# Calamares is free software: you can redistribute it and/or modify
|
# Calamares is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -25,7 +26,8 @@ import libcalamares
|
|||||||
|
|
||||||
|
|
||||||
def mount_partitions(root_mount_point, partitions):
|
def mount_partitions(root_mount_point, partitions):
|
||||||
""" Pass back mount point and filesystem for each partition.
|
"""
|
||||||
|
Pass back mount point and filesystem for each partition.
|
||||||
|
|
||||||
:param root_mount_point:
|
:param root_mount_point:
|
||||||
:param partitions:
|
:param partitions:
|
||||||
@ -42,8 +44,10 @@ def mount_partitions(root_mount_point, partitions):
|
|||||||
fstype = "vfat"
|
fstype = "vfat"
|
||||||
|
|
||||||
if "luksMapperName" in partition:
|
if "luksMapperName" in partition:
|
||||||
libcalamares.utils.debug("about to mount {!s}".format(partition["luksMapperName"]))
|
libcalamares.utils.debug("about to mount "
|
||||||
libcalamares.utils.mount("/dev/mapper/{!s}".format(partition["luksMapperName"]),
|
+ partition["luksMapperName"])
|
||||||
|
libcalamares.utils.mount("/dev/mapper/"
|
||||||
|
+ partition["luksMapperName"],
|
||||||
mount_point,
|
mount_point,
|
||||||
fstype,
|
fstype,
|
||||||
partition.get("options", ""),
|
partition.get("options", ""),
|
||||||
@ -80,37 +84,44 @@ def mount_partitions(root_mount_point, partitions):
|
|||||||
subprocess.check_call(["umount", "-v", root_mount_point])
|
subprocess.check_call(["umount", "-v", root_mount_point])
|
||||||
|
|
||||||
if "luksMapperName" in partition:
|
if "luksMapperName" in partition:
|
||||||
libcalamares.utils.mount("/dev/mapper/{!s}".format(partition["luksMapperName"]),
|
libcalamares.utils.mount("/dev/mapper/"
|
||||||
|
+ partition["luksMapperName"],
|
||||||
mount_point,
|
mount_point,
|
||||||
fstype,
|
fstype,
|
||||||
",".join(["subvol=@",
|
",".join(["subvol=@",
|
||||||
partition.get("options", "")]),
|
partition.get("options",
|
||||||
|
"")]),
|
||||||
)
|
)
|
||||||
if not has_home_mount_point:
|
if not has_home_mount_point:
|
||||||
libcalamares.utils.mount("/dev/mapper/{!s}".format(partition["luksMapperName"]),
|
libcalamares.utils.mount("/dev/mapper/"
|
||||||
|
+ partition["luksMapperName"],
|
||||||
root_mount_point + "/home",
|
root_mount_point + "/home",
|
||||||
fstype,
|
fstype,
|
||||||
",".join(["subvol=@home",
|
",".join(["subvol=@home",
|
||||||
partition.get("options", "")]),
|
partition.get("options",
|
||||||
|
"")]),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.mount(partition["device"],
|
libcalamares.utils.mount(partition["device"],
|
||||||
mount_point,
|
mount_point,
|
||||||
fstype,
|
fstype,
|
||||||
",".join(["subvol=@",
|
",".join(["subvol=@",
|
||||||
partition.get("options", "")]),
|
partition.get("options",
|
||||||
|
"")]),
|
||||||
)
|
)
|
||||||
if not has_home_mount_point:
|
if not has_home_mount_point:
|
||||||
libcalamares.utils.mount(partition["device"],
|
libcalamares.utils.mount(partition["device"],
|
||||||
root_mount_point + "/home",
|
root_mount_point + "/home",
|
||||||
fstype,
|
fstype,
|
||||||
",".join(["subvol=@home",
|
",".join(["subvol=@home",
|
||||||
partition.get("options", "")]),
|
partition.get("options",
|
||||||
|
"")]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
""" Define mountpoints.
|
"""
|
||||||
|
Define mountpoints.
|
||||||
|
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
@ -132,7 +143,8 @@ def run():
|
|||||||
|
|
||||||
# Remember the extra mounts for the unpackfs module
|
# Remember the extra mounts for the unpackfs module
|
||||||
if fw_type == 'efi':
|
if fw_type == 'efi':
|
||||||
libcalamares.globalstorage.insert("extraMounts", extra_mounts + extra_mounts_efi)
|
libcalamares.globalstorage.insert("extraMounts",
|
||||||
|
extra_mounts + extra_mounts_efi)
|
||||||
else:
|
else:
|
||||||
libcalamares.globalstorage.insert("extraMounts", extra_mounts)
|
libcalamares.globalstorage.insert("extraMounts", extra_mounts)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user