mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
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
7f7c15c678
commit
78072b7936
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user