From 78072b7936a00df460666097e46837e0e6fccd35 Mon Sep 17 00:00:00 2001 From: Garrett Fields Date: Wed, 18 Dec 2019 15:32:31 -0500 Subject: [PATCH] Exchanged two "${ZFS} get -H -o value" commands Initramfs uses "get_fs_value()" elsewhere. Reviewed-by: Brian Behlendorf Reviewed-by: Richard Laager Reviewed-by: Kjeld Schouten-Lebbing Signed-off-by: Garrett Fields Closes #9736 --- contrib/initramfs/scripts/zfs.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/initramfs/scripts/zfs.in b/contrib/initramfs/scripts/zfs.in index 554016062..4b04c4be4 100644 --- a/contrib/initramfs/scripts/zfs.in +++ b/contrib/initramfs/scripts/zfs.in @@ -410,11 +410,11 @@ decrypt_fs() if [ "$(zpool list -H -o feature@encryption $(echo "${fs}" | awk -F\/ '{print $1}'))" = 'active' ]; then # Determine dataset that holds key for root dataset - ENCRYPTIONROOT=$(${ZFS} get -H -o value encryptionroot "${fs}") + ENCRYPTIONROOT="$(get_fs_value "${fs}" encryptionroot)" # If root dataset is encrypted... if ! [ "${ENCRYPTIONROOT}" = "-" ]; then - KEYSTATUS="$(${ZFS} get -H -o value keystatus "${ENCRYPTIONROOT}")" + KEYSTATUS="$(get_fs_value "${ENCRYPTIONROOT}" keystatus)" # Continue only if the key needs to be loaded [ "$KEYSTATUS" = "unavailable" ] || return 0 TRY_COUNT=3