From fe291bc51a280816d4202a0e5dcc51fc0838bdde Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Tue, 3 Nov 2020 23:33:24 +0200 Subject: [PATCH] Write the crypttab entry still --- src/modules/openrcdmcryptcfg/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index 37c6098fd..efcf3eaed 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -42,8 +42,7 @@ def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): if not has_luks and not skip_partitions: libcalamares.utils.debug( "Skip writing OpenRC LUKS configuration for partition {!s}".format(partition["mountPoint"])) - # Don't use keyfile if boot is unecrypted, keys must not be stored on unencrypted partitions - if has_luks and not skip_partitions and not unencrypted_separate_boot: + if has_luks and not skip_partitions: crypto_target = partition["luksMapperName"] crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) libcalamares.utils.debug( @@ -52,7 +51,9 @@ def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): with open(os.path.join(root_mount_point, dmcrypt_conf_path), 'a+') as dmcrypt_file: dmcrypt_file.write("\ntarget=" + crypto_target) dmcrypt_file.write("\nsource=" + crypto_source) - dmcrypt_file.write("\nkey=/crypto_keyfile.bin") + # Don't use keyfile if boot is unecrypted, keys must not be stored on unencrypted partitions + if not unencrypted_separate_boot: + dmcrypt_file.write("\nkey=/crypto_keyfile.bin") dmcrypt_file.write("\n") if has_luks and skip_partitions: