summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-01-01 15:05:28 +0200
committerLars Wirzenius <liw@liw.fi>2022-01-01 15:05:28 +0200
commita5d1632d7fb4d141acb067644154f1136100a06b (patch)
tree86c110a750cec34565b63c876b8a59310bc3a631
parent844e57c9e6d77b6485d5659a7894c4ac7ef3fe9d (diff)
downloadvmdb2-a5d1632d7fb4d141acb067644154f1136100a06b.tar.gz
fix condition for crypttab
Sponsored-by: author
-rw-r--r--vmdb/plugins/cryptsetup_plugin.py1
-rw-r--r--vmdb/plugins/fstab_plugin.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/vmdb/plugins/cryptsetup_plugin.py b/vmdb/plugins/cryptsetup_plugin.py
index 985bc42..c69b9c8 100644
--- a/vmdb/plugins/cryptsetup_plugin.py
+++ b/vmdb/plugins/cryptsetup_plugin.py
@@ -53,6 +53,7 @@ class CryptsetupStepRunner(vmdb.StepRunnerInterface):
uuid = vmdb.runcmd(["cryptsetup", "luksUUID", device]).decode("UTF8").strip()
state.tags.append(name)
+ state.tags.set_dev(name, crypt_device)
state.tags.set_uuid(name, uuid)
state.tags.set_dm(name, name)
vmdb.progress("remembering LUKS device {} as {}".format(crypt_device, name))
diff --git a/vmdb/plugins/fstab_plugin.py b/vmdb/plugins/fstab_plugin.py
index 7f8ef15..04c2312 100644
--- a/vmdb/plugins/fstab_plugin.py
+++ b/vmdb/plugins/fstab_plugin.py
@@ -66,5 +66,5 @@ class FstabStepRunner(vmdb.StepRunnerInterface):
line = "{name} UUID={uuid} none luks,discard\n"
with open(crypttab_path, "w") as crypttab:
for entry in filesystems:
- if "uuid" in entry and "name" in entry and "device" not in entry:
+ if "uuid" in entry and "name" in entry:
crypttab.write(line.format(**entry))