From a6b5c45853332dd72ed06691c7d8405540907acd Mon Sep 17 00:00:00 2001 From: nils Date: Sat, 5 Apr 2025 22:35:35 +0200 Subject: [PATCH] version bump to 0.3 Might have made the hook non-functional in 0.2 :-) --- meson.build | 2 +- zlevis.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 9f0a1aa..24066c0 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # Project definition -project('zlevis-dracut', version: '0.2') +project('zlevis-dracut', version: '0.3') # Files which need to be moved src_files = [ diff --git a/zlevis.sh b/zlevis.sh index f2cebab..4601506 100755 --- a/zlevis.sh +++ b/zlevis.sh @@ -11,11 +11,11 @@ local _root_pool="${_root_vol%%/*}" # Import the root pool zpool import -N -d /dev $_root_pool -# If the pool is encrypted run `zlevis decrypt` to decrypt using the tpm2 +# If the pool is encrypted run `zlevis decrypt` to obtain the key stored in the tpm2 and load it if [ $(zpool list -H -o feature@encryption $_root_pool) = "active" ]; then local _encryption_root=$(zfs get -H -o value encryptionroot $_root_vol) if [ "$_encryption_root" != "-" ]; then - zlevis decrypt $_root_pool || echo "zlevis decryption failed!" + zlevis decrypt $_root_pool | zfs load-key -L prompt "$_root_pool" || echo "zlevis failed to unlock $_root_pool" fi fi