It should work
This commit is contained in:
commit
c513e63fbd
2 changed files with 37 additions and 0 deletions
21
zlevis.sh
Executable file
21
zlevis.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# First make sure the zfs kmod is loaded
|
||||
modprobe zfs 2>/dev/null
|
||||
udevadm settle
|
||||
|
||||
# Inspired by Alpine Linux's mkinitfs script -
|
||||
local _root_vol="${root}"
|
||||
local _root_pool="${_root_vol%%/*}"
|
||||
|
||||
zpool import -N -d /dev $_root_pool
|
||||
|
||||
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