[initcpiocfg] Use booleans for boolean values

(as previous) Use False/True rather than ""/"yes" for
keeping track of does-the-system-use-lvm2.
This commit is contained in:
Adriaan de Groot 2021-09-21 12:54:18 +02:00
parent 7f7dc04e8d
commit 7c3c7c4ff7

View File

@ -134,7 +134,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
"""
swap_uuid = ""
uses_btrfs = False
lvm2 = ""
uses_lvm2 = False
hooks = ["base", "udev", "autodetect", "modconf", "block", "keyboard",
"keymap"]
modules = []
@ -161,7 +161,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
uses_btrfs = True
if "lvm2" in partition["fs"]:
lvm2 = "yes"
uses_lvm2 = True
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
encrypt_hook = True
@ -183,7 +183,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
):
files.append("/crypto_keyfile.bin")
if lvm2:
if uses_lvm2:
hooks.append("lvm2")
if swap_uuid != "":