aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2021-04-23 20:41:47 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2021-04-30 22:04:38 +0000
commit208675a09b7f7a030d1b3d38c0eb1860e609ca6b (patch)
tree883a83faec06abdd49fad8222b12dfe3d49b1d16
parent8dca000040bd82cebd2c184d219836b7884ddf56 (diff)
downloadsrc-208675a09b7f7a030d1b3d38c0eb1860e609ca6b.tar.gz
src-208675a09b7f7a030d1b3d38c0eb1860e609ca6b.zip
zed.d/history_event-zfs-list-cacher.sh: no grep for snapshot detection
Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11935
-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 bf5a121f6a79..15f0a8ed6189 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