diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 690cf0b91..f0c4c1afb 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -111,7 +111,7 @@ def create_systemd_boot_conf(uuid, conf_path, kernel_line): # - encrypted root sets cryptdevice_params for partition in partitions: has_luks = "luksMapperName" in partition - if partition["fs"].lower().replace("-","").replace("linux","") == "swap" and not has_luks: + if partition["fs"].lower().replace("-","") == "linuxswap" and not has_luks: swap_uuid = partition["uuid"] if partition["mountPoint"] == "/" and has_luks: diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py index e05b0f128..876a6f30b 100644 --- a/src/modules/fstab/main.py +++ b/src/modules/fstab/main.py @@ -56,7 +56,6 @@ FS_MAP = { "fat32": "vfat", "linuxswap": "swap", "linux-swap": "swap", - "swap": "swap", } diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index bbef4b082..e55a0b996 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -60,10 +60,10 @@ def modify_grub_default(partitions, root_mount_point, distributor): if have_dracut: for partition in partitions: has_luks = "luksMapperName" in partition - if partition["fs"].lower().replace("-","").replace("linux","") == "swap" and not has_luks: + if partition["fs"].lower().replace("-","") == "linuxswap" and not has_luks: swap_uuid = partition["uuid"] - if (partition["fs"].lower().replace("-","").replace("linux","") == "swap" and has_luks): + if (partition["fs"].lower().replace("-","") == "linuxswap" and has_luks): swap_outer_uuid = partition["luksUuid"] swap_outer_mappername = partition["luksMapperName"] @@ -74,7 +74,7 @@ def modify_grub_default(partitions, root_mount_point, distributor): else: for partition in partitions: has_luks = "luksMapperName" in partition - if partition["fs"].lower().replace("-","").replace("linux","") == "swap" and not has_luks: + if partition["fs"].lower().replace("-","") == "linuxswap" and not has_luks: swap_uuid = partition["uuid"] if (partition["mountPoint"] == "/" and has_luks): diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index 489d37df5..0c6a15aac 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -114,7 +114,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): hooks.append("plymouth") for partition in partitions: - if partition["fs"].lower().replace("-","").replace("linux","") == "swap": + if partition["fs"].lower().replace("-","") == "linuxswap": swap_uuid = partition["uuid"] if "luksMapperName" in partition: openswap_hook = True diff --git a/src/modules/luksbootkeyfile/main.py b/src/modules/luksbootkeyfile/main.py index 48b89ce14..077b91d13 100644 --- a/src/modules/luksbootkeyfile/main.py +++ b/src/modules/luksbootkeyfile/main.py @@ -47,7 +47,7 @@ def run(): luks_root_device = partition["device"] luks_root_passphrase = partition["luksPassphrase"] elif "luksMapperName" in partition and\ - (partition["mountPoint"] or partition["fs"].lower().replace("-","").replace("linux","") == "swap"): + (partition["mountPoint"] or partition["fs"].lower().replace("-","") == "linuxswap"): additional_luks_devices.append((partition["device"], partition["luksPassphrase"])) diff --git a/src/modules/luksopenswaphookcfg/main.py b/src/modules/luksopenswaphookcfg/main.py index 0fb978cc5..b21893837 100644 --- a/src/modules/luksopenswaphookcfg/main.py +++ b/src/modules/luksopenswaphookcfg/main.py @@ -30,7 +30,7 @@ def write_openswap_conf(partitions, root_mount_point, openswap_conf_path): mountable_keyfile_device = "" for partition in partitions: - if partition["fs"].lower().replace("-","").replace("linux","") == "swap" and "luksMapperName" in partition: + if partition["fs"].lower().replace("-","") == "linuxswap" and "luksMapperName" in partition: swap_outer_uuid = partition["luksUuid"] swap_mapper_name = partition["luksMapperName"]