Skip to content

Commit

Permalink
zed.d/zed-functions.sh: fix zed_guid_to_pool() on dash
Browse files Browse the repository at this point in the history
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11954
  • Loading branch information
nabijaczleweli committed Apr 27, 2021
1 parent 7ca6edb commit 053fe28
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmd/zed/zed.d/zed-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ zed_notify_pushbullet()
#
# Notification via Slack Webhook <https://api.slack.com/incoming-webhooks>.
# 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.
#
Expand Down Expand Up @@ -511,10 +511,7 @@ 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
$ZPOOL get -H -ovalue,name guid | awk '$1 == '"$1"' {print $2; exit}'
}

# zed_exit_if_ignoring_this_event
Expand Down

0 comments on commit 053fe28

Please sign in to comment.