diff options
Diffstat (limited to 'cmd/zed')
-rw-r--r-- | cmd/zed/Makefile.am | 8 | ||||
l--------- | cmd/zed/zed.d/resilver.finish-notify.sh | 1 | ||||
l--------- | cmd/zed/zed.d/resilver_finish-notify.sh | 1 | ||||
-rwxr-xr-x | cmd/zed/zed.d/scrub_finish-notify.sh (renamed from cmd/zed/zed.d/scrub.finish-notify.sh) | 10 | ||||
-rw-r--r-- | cmd/zed/zed_event.c | 5 |
5 files changed, 12 insertions, 13 deletions
diff --git a/cmd/zed/Makefile.am b/cmd/zed/Makefile.am index 70e4f7f69..20e8bf1dc 100644 --- a/cmd/zed/Makefile.am +++ b/cmd/zed/Makefile.am @@ -49,8 +49,8 @@ dist_zedexec_SCRIPTS = \ zed.d/generic-notify.sh \ zed.d/io-notify.sh \ zed.d/io-spare.sh \ - zed.d/resilver.finish-notify.sh \ - zed.d/scrub.finish-notify.sh + zed.d/resilver_finish-notify.sh \ + zed.d/scrub_finish-notify.sh zedconfdefaults = \ all-syslog.sh \ @@ -59,8 +59,8 @@ zedconfdefaults = \ data-notify.sh \ io-notify.sh \ io-spare.sh \ - resilver.finish-notify.sh \ - scrub.finish-notify.sh + resilver_finish-notify.sh \ + scrub_finish-notify.sh install-data-hook: $(MKDIR_P) "$(DESTDIR)$(zedconfdir)" diff --git a/cmd/zed/zed.d/resilver.finish-notify.sh b/cmd/zed/zed.d/resilver.finish-notify.sh deleted file mode 120000 index 2635dcce1..000000000 --- a/cmd/zed/zed.d/resilver.finish-notify.sh +++ /dev/null @@ -1 +0,0 @@ -scrub.finish-notify.sh
\ No newline at end of file diff --git a/cmd/zed/zed.d/resilver_finish-notify.sh b/cmd/zed/zed.d/resilver_finish-notify.sh new file mode 120000 index 000000000..e4c56bc5f --- /dev/null +++ b/cmd/zed/zed.d/resilver_finish-notify.sh @@ -0,0 +1 @@ +scrub_finish-notify.sh
\ No newline at end of file diff --git a/cmd/zed/zed.d/scrub.finish-notify.sh b/cmd/zed/zed.d/scrub_finish-notify.sh index b4dd1dd43..2145a100a 100755 --- a/cmd/zed/zed.d/scrub.finish-notify.sh +++ b/cmd/zed/zed.d/scrub_finish-notify.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# Send notification in response to a RESILVER.FINISH or SCRUB.FINISH. +# Send notification in response to a RESILVER_FINISH or SCRUB_FINISH. # -# By default, "zpool status" output will only be included for a scrub.finish +# By default, "zpool status" output will only be included for a scrub_finish # zevent if the pool is not healthy; to always include its output, set # ZED_NOTIFY_VERBOSE=1. # @@ -19,9 +19,9 @@ [ -n "${ZEVENT_POOL}" ] || exit 9 [ -n "${ZEVENT_SUBCLASS}" ] || exit 9 -if [ "${ZEVENT_SUBCLASS}" = "resilver.finish" ]; then +if [ "${ZEVENT_SUBCLASS}" = "resilver_finish" ]; then action="resilver" -elif [ "${ZEVENT_SUBCLASS}" = "scrub.finish" ]; then +elif [ "${ZEVENT_SUBCLASS}" = "scrub_finish" ]; then action="scrub" else zed_log_err "unsupported event class \"${ZEVENT_SUBCLASS}\"" @@ -33,7 +33,7 @@ zed_check_cmd "${ZPOOL}" || exit 9 # For scrub, suppress notification if the pool is healthy # and verbosity is not enabled. # -if [ "${ZEVENT_SUBCLASS}" = "scrub.finish" ]; then +if [ "${ZEVENT_SUBCLASS}" = "scrub_finish" ]; then healthy="$("${ZPOOL}" status -x "${ZEVENT_POOL}" \ | grep "'${ZEVENT_POOL}' is healthy")" [ -n "${healthy}" ] && [ "${ZED_NOTIFY_VERBOSE}" -eq 0 ] && exit 3 diff --git a/cmd/zed/zed_event.c b/cmd/zed/zed_event.c index bd298dc41..7d819b803 100644 --- a/cmd/zed/zed_event.c +++ b/cmd/zed/zed_event.c @@ -748,9 +748,8 @@ _zed_event_add_env_preserve(uint64_t eid, zed_strings_t *zsp) /* * Compute the "subclass" by removing the first 3 components of [class] - * (which seem to always be either "ereport.fs.zfs" or "resource.fs.zfs"). - * Return a pointer inside the string [class], or NULL if insufficient - * components exist. + * (which will always be of the form "*.fs.zfs"). Return a pointer inside + * the string [class], or NULL if insufficient components exist. */ static const char * _zed_event_get_subclass(const char *class) |