From 08d2e3971961b9b9246f4f999fa00f3fd6eb1df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Tue, 27 Apr 2021 17:27:33 +0200 Subject: [PATCH] zed.d/zed-functions.sh: fix zed_guid_to_pool() on dash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Tony Hutter Signed-off-by: Ahelenia ZiemiaƄska Closes #11935 Closes #11954 --- cmd/zed/zed.d/zed-functions.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/zed/zed.d/zed-functions.sh b/cmd/zed/zed.d/zed-functions.sh index 44a9b8d233..1fd3888625 100644 --- a/cmd/zed/zed.d/zed-functions.sh +++ b/cmd/zed/zed.d/zed-functions.sh @@ -367,7 +367,7 @@ zed_notify_pushbullet() # # Notification via Slack Webhook . # The Webhook URL (ZED_SLACK_WEBHOOK_URL) identifies this client to the -# Slack channel. +# Slack channel. # # Requires awk, curl, and sed executables to be installed in the standard PATH. # @@ -511,10 +511,8 @@ zed_guid_to_pool() return fi - guid=$(printf "%llu" "$1") - if [ -n "$guid" ] ; then - $ZPOOL get -H -ovalue,name guid | awk '$1=='"$guid"' {print $2}' - fi + guid="$(printf "%u" "$1")" + $ZPOOL get -H -ovalue,name guid | awk '$1 == '"$guid"' {print $2; exit}' } # zed_exit_if_ignoring_this_event