Exchanged two "${ZFS} get -H -o value" commands
Initramfs uses "get_fs_value()" elsewhere. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Signed-off-by: Garrett Fields <ghfields@gmail.com> Closes #9736
This commit is contained in:
parent
7839c4b5e1
commit
b8a899e94f
|
@ -410,11 +410,11 @@ decrypt_fs()
|
||||||
if [ "$(zpool list -H -o feature@encryption $(echo "${fs}" | awk -F\/ '{print $1}'))" = 'active' ]; then
|
if [ "$(zpool list -H -o feature@encryption $(echo "${fs}" | awk -F\/ '{print $1}'))" = 'active' ]; then
|
||||||
|
|
||||||
# Determine dataset that holds key for root dataset
|
# 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 root dataset is encrypted...
|
||||||
if ! [ "${ENCRYPTIONROOT}" = "-" ]; then
|
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
|
# Continue only if the key needs to be loaded
|
||||||
[ "$KEYSTATUS" = "unavailable" ] || return 0
|
[ "$KEYSTATUS" = "unavailable" ] || return 0
|
||||||
TRY_COUNT=3
|
TRY_COUNT=3
|
||||||
|
|
Loading…
Reference in New Issue