Compare commits

...

2 commits

Author SHA1 Message Date
nils
a6b5c45853 version bump to 0.3
Might have made the hook non-functional in 0.2   :-)
2025-04-05 22:35:35 +02:00
nils
98cec37455 updated the error message 2025-04-05 22:11:21 +02:00
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
# Project definition # Project definition
project('zlevis-dracut', version: '0.2') project('zlevis-dracut', version: '0.3')
# Files which need to be moved # Files which need to be moved
src_files = [ src_files = [

View file

@ -11,11 +11,11 @@ local _root_pool="${_root_vol%%/*}"
# Import the root pool # Import the root pool
zpool import -N -d /dev $_root_pool zpool import -N -d /dev $_root_pool
# If the pool is encrypted run zlevis-fetch 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 if [ $(zpool list -H -o feature@encryption $_root_pool) = "active" ]; then
local _encryption_root=$(zfs get -H -o value encryptionroot $_root_vol) local _encryption_root=$(zfs get -H -o value encryptionroot $_root_vol)
if [ "$_encryption_root" != "-" ]; then if [ "$_encryption_root" != "-" ]; then
zlevis decrypt $_root_pool || echo "Zlevis-fetch failed!" zlevis decrypt $_root_pool | zfs load-key -L prompt "$_root_pool" || echo "zlevis failed to unlock $_root_pool"
fi fi
fi fi