Fix(zfs_fs); Mount/Unmount with encryption

- Fix typo against full dataset path argument
- Make unmount with encryption keys idempotent
This commit is contained in:
Bert Proesmans authored and Jörg Thalheim committed 2025-11-20 14:10:46 +00:00
1 parent a19c2b6d3a
commit 436fd911cf
1 file changed
+5 -1
+5 -1
View File
@@ -143,7 +143,11 @@
inherit config options;
default =
(lib.optionalAttrs (config.options.keylocation or "none" != "none") {
dev = "zfs unload-key ${config.name}";
dev = ''
if [ "$(zfs get keystatus ${config._name} -H -o value)" == "available" ]; then
zfs unload-key ${config._name}
fi
'';
})
// lib.optionalAttrs
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")