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