Removed bug in zlevis-fetch.

This commit is contained in:
Luc Bijl 2024-11-17 19:13:29 +01:00
parent 2b5f370781
commit f11bd91d75

View file

@ -9,7 +9,7 @@ command -v zlevis-decrypt > /dev/null || exit 1
# Read ZFS dataset information.
zfs list -Ho name,encryption,keystatus,encryptionroot,tpm:jwe | while IFS=$'\t' read -r ds enc keystatus encroot jwe; do
# Check if the dataset is the encryption root.
if [ "$ds" = "$encroot" ] && [ "$enc" != "off" ] && [ "$key" != "-" ]; then
if [ "$ds" = "$encroot" ] && [ "$enc" != "off" ] && [ "$jwe" != "-" ]; then
if [ "$keystatus" = "available" ]; then
echo "Pool $ds already unlocked"
else