Added license and finishing touches for first tag
This commit is contained in:
parent
40f3f63510
commit
5d04ea2645
2 changed files with 236 additions and 3 deletions
|
@ -4,18 +4,18 @@
|
|||
modprobe zfs 2>/dev/null
|
||||
udevadm settle
|
||||
|
||||
# Inspired by Alpine Linux's mkinitfs script -
|
||||
# Inspired by Alpine Linux's mkinitfs script - search for encrypted pool's by means of the cmdline root atribute
|
||||
local _root_vol="${root}"
|
||||
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 [ $(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-fetch || echo "Zlevis-fetch failed!"
|
||||
fi
|
||||
else
|
||||
echo "Something went wrong with zlevis-dracut!"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue