mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Use %%/* instead of awk -F/ {print $1} to strip datasets
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12108
This commit is contained in:
@@ -390,7 +390,7 @@ decrypt_fs()
|
||||
fs="$1"
|
||||
|
||||
# If pool encryption is active and the zfs command understands '-o encryption'
|
||||
if [ "$(zpool list -H -o feature@encryption "$(echo "${fs}" | awk -F/ '{print $1}')")" = 'active' ]; then
|
||||
if [ "$(zpool list -H -o feature@encryption "${fs%%/*}")" = 'active' ]; then
|
||||
|
||||
# Determine dataset that holds key for root dataset
|
||||
ENCRYPTIONROOT="$(get_fs_value "${fs}" encryptionroot)"
|
||||
|
||||
Reference in New Issue
Block a user