1zedconfdir = $(sysconfdir)/zfs/zed.d
2dist_zedconf_DATA = \
3	%D%/zed-functions.sh \
4	%D%/zed.rc
5
6zedexecdir = $(zfsexecdir)/zed.d
7
8dist_zedexec_SCRIPTS = \
9	%D%/all-debug.sh \
10	%D%/all-syslog.sh \
11	%D%/data-notify.sh \
12	%D%/generic-notify.sh \
13	%D%/pool_import-led.sh \
14	%D%/resilver_finish-notify.sh \
15	%D%/resilver_finish-start-scrub.sh \
16	%D%/scrub_finish-notify.sh \
17	%D%/statechange-led.sh \
18	%D%/statechange-notify.sh \
19	%D%/statechange-slot_off.sh \
20	%D%/trim_finish-notify.sh \
21	%D%/vdev_attach-led.sh \
22	%D%/vdev_clear-led.sh
23
24nodist_zedexec_SCRIPTS = \
25	%D%/history_event-zfs-list-cacher.sh
26
27SUBSTFILES += $(nodist_zedexec_SCRIPTS)
28
29zedconfdefaults = \
30	all-syslog.sh \
31	data-notify.sh \
32	history_event-zfs-list-cacher.sh \
33	pool_import-led.sh \
34	resilver_finish-notify.sh \
35	resilver_finish-start-scrub.sh \
36	scrub_finish-notify.sh \
37	statechange-led.sh \
38	statechange-notify.sh \
39	statechange-slot_off.sh \
40	vdev_attach-led.sh \
41	vdev_clear-led.sh
42
43dist_noinst_DATA += %D%/README
44
45INSTALL_DATA_HOOKS += zed-install-data-hook
46zed-install-data-hook:
47	$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
48	set -x; for f in $(zedconfdefaults); do \
49	  [ -f "$(DESTDIR)$(zedconfdir)/$${f}" ] ||\
50	    [ -L "$(DESTDIR)$(zedconfdir)/$${f}" ] || \
51	    $(LN_S) "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
52	done
53
54SHELLCHECKSCRIPTS += $(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)
55$(call SHELLCHECK_OPTS,$(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)): SHELLCHECK_SHELL = sh
56# False positive: 1>&"${ZED_FLOCK_FD}" looks suspiciously similar to a >&filename bash extension
57$(call SHELLCHECK_OPTS,$(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)): CHECKBASHISMS_IGNORE = -e 'should be >word 2>&1' -e '&"$${ZED_FLOCK_FD}"'
58