diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index 642e18df2..f13d6552e 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -90,9 +90,7 @@ def modify_grub_default(partitions, root_mount_point, distributor): swap_outer_uuid = "" swap_outer_mappername = None no_save_default = False - unencrypted_separate_boot = False - if any(partition["mountPoint"] == "/boot" and "luksMapperName" not in partition for partition in partitions): - unencrypted_separate_boot = True + unencrypted_separate_boot = any(p["mountPoint"] == "/boot" and "luksMapperName" not in p for p in partitions): for partition in partitions: if partition["mountPoint"] in ("/", "/boot") and partition["fs"] in ("btrfs", "f2fs"): diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index 818ca4963..ead8a0a93 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -29,9 +29,7 @@ def pretty_name(): def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): crypto_target = "" crypto_source = "" - unencrypted_separate_boot = False - if any(partition["mountPoint"] == "/boot" and "luksMapperName" not in partition for partition in partitions): - unencrypted_separate_boot = True + unencrypted_separate_boot = any(p["mountPoint"] == "/boot" and "luksMapperName" not in p for p in partitions): for partition in partitions: has_luks = "luksMapperName" in partition