diff options
author | наб <[email protected]> | 2020-11-12 23:16:50 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-11-19 16:20:57 -0800 |
commit | 567e4d0dfafd9a6da8efff2b6c49f740ecf0bb9d (patch) | |
tree | 9669000edde21908969f684e55178216fd3f22ea /contrib/dracut/90zfs | |
parent | 2d9f82d89118240d19a6857c84b45f4481a5543b (diff) |
dracut/mount-zfs.sh: quote expansion on zpool test
Bring over some of the improvements from dracut/zfs-load-key.sh,
shellcheck is slightly quieter as well
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11198
Diffstat (limited to 'contrib/dracut/90zfs')
-rwxr-xr-x | contrib/dracut/90zfs/mount-zfs.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/dracut/90zfs/mount-zfs.sh.in b/contrib/dracut/90zfs/mount-zfs.sh.in index f5b3d9056..ca407fdd4 100755 --- a/contrib/dracut/90zfs/mount-zfs.sh.in +++ b/contrib/dracut/90zfs/mount-zfs.sh.in @@ -58,7 +58,7 @@ ZFS_POOL="${ZFS_DATASET%%/*}" if import_pool "${ZFS_POOL}" ; then # Load keys if we can or if we need to - if [ $(zpool list -H -o feature@encryption $(echo "${ZFS_POOL}" | awk -F\/ '{print $1}')) = 'active' ]; then + if [ "$(zpool list -H -o feature@encryption "$(echo "${ZFS_POOL}" | awk -F/ '{print $1}')")" = 'active' ]; then # if the root dataset has encryption enabled ENCRYPTIONROOT="$(zfs get -H -o value encryptionroot "${ZFS_DATASET}")" if ! [ "${ENCRYPTIONROOT}" = "-" ]; then |