Compare commits
2 commits
zlevis-dra
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
a6b5c45853 | ||
|
98cec37455 |
2 changed files with 3 additions and 3 deletions
|
@ -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 = [
|
||||
|
|
|
@ -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-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
|
||||
local _encryption_root=$(zfs get -H -o value encryptionroot $_root_vol)
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue