fix initcpiocfg filesystems loop

Signed-off-by: Peter Jung <admin@ptr1337.dev>
This commit is contained in:
Peter Jung 2022-09-24 13:46:44 +02:00
parent f75b599e2a
commit 5c87452b67
No known key found for this signature in database
GPG Key ID: C3C4820857F654FE

View File

@ -169,8 +169,6 @@ def find_initcpio_features(partitions, root_mount_point):
hooks.append("plymouth") hooks.append("plymouth")
for partition in partitions: for partition in partitions:
hooks.extend(["filesystems"])
if partition["fs"] == "linuxswap" and not partition.get("claimed", None): if partition["fs"] == "linuxswap" and not partition.get("claimed", None):
# Skip foreign swap # Skip foreign swap
continue continue
@ -218,9 +216,11 @@ def find_initcpio_features(partitions, root_mount_point):
hooks.append("zfs") hooks.append("zfs")
if swap_uuid != "": if swap_uuid != "":
hooks.extend(["resume"])
if encrypt_hook and openswap_hook: if encrypt_hook and openswap_hook:
hooks.extend(["openswap"]) hooks.extend(["openswap"])
hooks.extend(["resume", "filesystems"])
else:
hooks.extend(["filesystems"])
if uses_btrfs: if uses_btrfs:
modules.append("crc32c-intel" if cpuinfo().is_intel else "crc32c") modules.append("crc32c-intel" if cpuinfo().is_intel else "crc32c")