mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
Fix(zfs_volume); Volume mount/unmount with encryption
- Fix consistent use of fully qualified dataset path - Add idempotent unmounting with encryption keys
This commit is contained in:
1 parent
03e19b4f67
commit
5c7406ecc5
1 file changed
+7
-5
@@ -88,8 +88,8 @@
|
||||
default = {
|
||||
dev = ''
|
||||
${lib.optionalString (config.options.keylocation or "none" != "none") ''
|
||||
if [ "$(zfs get keystatus ${config.name} -H -o value)" == "unavailable" ]; then
|
||||
zfs load-key ${config.name}
|
||||
if [ "$(zfs get keystatus ${config._name} -H -o value)" == "unavailable" ]; then
|
||||
zfs load-key ${config._name}
|
||||
fi
|
||||
''}
|
||||
|
||||
@@ -102,9 +102,11 @@
|
||||
inherit config options;
|
||||
default = {
|
||||
dev = ''
|
||||
${lib.optionalString (
|
||||
config.options.keylocation or "none" != "none"
|
||||
) "zfs unload-key ${config.name}"}
|
||||
${lib.optionalString (config.options.keylocation or "none" != "none") ''
|
||||
if [ "$(zfs get keystatus ${config._name} -H -o value)" == "available" ]; then
|
||||
zfs unload-key ${config._name}
|
||||
fi
|
||||
''}
|
||||
|
||||
${config.content._unmount.dev or ""}
|
||||
'';
|
||||
|
||||
Reference in new issue
Block a user