zed.d/zed-functions.sh: fix zed_guid_to_pool() on dash

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11935
Closes #11954
This commit is contained in:
наб 2021-04-27 17:27:33 +02:00 committed by Brian Behlendorf
parent 208675a09b
commit ec4f330816
1 changed files with 3 additions and 5 deletions

View File

@ -511,10 +511,8 @@ zed_guid_to_pool()
return return
fi fi
guid=$(printf "%llu" "$1") guid="$(printf "%u" "$1")"
if [ -n "$guid" ] ; then $ZPOOL get -H -ovalue,name guid | awk '$1 == '"$guid"' {print $2; exit}'
$ZPOOL get -H -ovalue,name guid | awk '$1=='"$guid"' {print $2}'
fi
} }
# zed_exit_if_ignoring_this_event # zed_exit_if_ignoring_this_event