Fix crypttab

This commit is contained in:
abalfoort 2022-05-16 15:06:59 +02:00
parent cd4b8d4179
commit 25a6a5ee53

View File

@ -162,14 +162,19 @@ class FstabGenerator(object):
crypttab_options = self.crypttab_options
# Set crypttab password for partition to none and remove crypttab options
# if crypto_keyfile.bin was not generated
if not os.path.exists(os.path.join(self.root_mount_point, "crypto_keyfile.bin")):
password = "none"
crypttab_options = ""
# on root partition when /boot is unencrypted
if partition["mountPoint"] == "/":
elif partition["mountPoint"] == "/":
if any([p["mountPoint"] == "/boot"
and "luksMapperName" not in p
for p in self.partitions]):
password = "none"
crypttab_options = ""
return dict(
name=mapper_name,
device="UUID=" + luks_uuid,