aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-04-23 22:41:47 +0200
committerBrian Behlendorf <[email protected]>2021-04-30 15:04:38 -0700
commit208675a09b7f7a030d1b3d38c0eb1860e609ca6b (patch)
tree883a83faec06abdd49fad8222b12dfe3d49b1d16 /cmd
parent8dca000040bd82cebd2c184d219836b7884ddf56 (diff)
zed.d/history_event-zfs-list-cacher.sh: no grep for snapshot detection
Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11935
Diffstat (limited to 'cmd')
-rwxr-xr-xcmd/zed/zed.d/history_event-zfs-list-cacher.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in b/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
index bf5a121f6..15f0a8ed6 100755
--- a/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
+++ b/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
@@ -14,10 +14,10 @@ FSLIST="${FSLIST_DIR}/${ZEVENT_POOL}"
. "${ZED_ZEDLET_DIR}/zed-functions.sh"
[ "$ZEVENT_SUBCLASS" != "history_event" ] && exit 0
-zed_check_cmd "${ZFS}" sort diff grep
+zed_check_cmd "${ZFS}" sort diff
# If we are acting on a snapshot, we have nothing to do
-printf '%s' "${ZEVENT_HISTORY_DSNAME}" | grep '@' && exit 0
+[ "${ZEVENT_HISTORY_DSNAME%@*}" = "${ZEVENT_HISTORY_DSNAME}" ] || exit 0
# We obtain a lock on zfs-list to avoid any simultaneous writes.
# If we run into trouble, log and drop the lock