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