Skip to content
Snippets Groups Projects
Commit 25a6a5ee authored by abalfoort's avatar abalfoort
Browse files

Fix crypttab

parent cd4b8d41
No related branches found
No related tags found
No related merge requests found
...@@ -162,14 +162,19 @@ class FstabGenerator(object): ...@@ -162,14 +162,19 @@ class FstabGenerator(object):
crypttab_options = self.crypttab_options crypttab_options = self.crypttab_options
# Set crypttab password for partition to none and remove 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 # on root partition when /boot is unencrypted
if partition["mountPoint"] == "/": elif partition["mountPoint"] == "/":
if any([p["mountPoint"] == "/boot" if any([p["mountPoint"] == "/boot"
and "luksMapperName" not in p and "luksMapperName" not in p
for p in self.partitions]): for p in self.partitions]):
password = "none" password = "none"
crypttab_options = "" crypttab_options = ""
return dict( return dict(
name=mapper_name, name=mapper_name,
device="UUID=" + luks_uuid, device="UUID=" + luks_uuid,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment