Compare commits

..

No commits in common. "main" and "zlevis-dracut-0.2" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
# Project definition # Project definition
project('zlevis-dracut', version: '0.3') project('zlevis-dracut', version: '0.2')
# 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 decrypt` to obtain the key stored in the tpm2 and load it # If the pool is encrypted run zlevis-fetch to decrypt using the tpm2
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 | zfs load-key -L prompt "$_root_pool" || echo "zlevis failed to unlock $_root_pool" zlevis decrypt $_root_pool || echo "Zlevis-fetch failed!"
fi fi
fi fi