2014-01-22 01:30:03 +04:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
|
|
|
DEFAULT_INCLUDES += \
|
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(top_srcdir)/lib/libspl/include
|
|
|
|
|
2018-04-07 00:11:09 +03:00
|
|
|
EXTRA_DIST = zed.d/README \
|
|
|
|
zed.d/history_event-zfs-list-cacher.sh.in
|
2015-02-18 04:23:54 +03:00
|
|
|
|
2014-01-22 01:30:03 +04:00
|
|
|
sbin_PROGRAMS = zed
|
|
|
|
|
2016-09-01 00:46:58 +03:00
|
|
|
ZED_SRC = \
|
2014-06-10 01:55:31 +04:00
|
|
|
zed.c \
|
|
|
|
zed.h \
|
|
|
|
zed_conf.c \
|
|
|
|
zed_conf.h \
|
2016-09-01 00:46:58 +03:00
|
|
|
zed_disk_event.c \
|
|
|
|
zed_disk_event.h \
|
2014-06-10 01:55:31 +04:00
|
|
|
zed_event.c \
|
|
|
|
zed_event.h \
|
|
|
|
zed_exec.c \
|
|
|
|
zed_exec.h \
|
|
|
|
zed_file.c \
|
|
|
|
zed_file.h \
|
|
|
|
zed_log.c \
|
|
|
|
zed_log.h \
|
|
|
|
zed_strings.c \
|
|
|
|
zed_strings.h
|
2014-01-22 01:30:03 +04:00
|
|
|
|
2016-09-01 00:46:58 +03:00
|
|
|
FMA_SRC = \
|
2016-11-08 02:01:38 +03:00
|
|
|
agents/zfs_agents.c \
|
2016-09-01 00:46:58 +03:00
|
|
|
agents/zfs_agents.h \
|
|
|
|
agents/zfs_diagnosis.c \
|
|
|
|
agents/zfs_mod.c \
|
2016-11-08 02:01:38 +03:00
|
|
|
agents/zfs_retire.c \
|
|
|
|
agents/fmd_api.c \
|
|
|
|
agents/fmd_api.h \
|
|
|
|
agents/fmd_serd.c \
|
|
|
|
agents/fmd_serd.h
|
2016-09-01 00:46:58 +03:00
|
|
|
|
|
|
|
zed_SOURCES = $(ZED_SRC) $(FMA_SRC)
|
|
|
|
|
2014-01-22 01:30:03 +04:00
|
|
|
zed_LDADD = \
|
|
|
|
$(top_builddir)/lib/libnvpair/libnvpair.la \
|
2016-11-08 02:01:38 +03:00
|
|
|
$(top_builddir)/lib/libuutil/libuutil.la \
|
2017-08-10 01:31:08 +03:00
|
|
|
$(top_builddir)/lib/libzfs/libzfs.la
|
2014-01-22 01:30:03 +04:00
|
|
|
|
2017-08-10 01:31:08 +03:00
|
|
|
zed_LDADD += -lrt
|
|
|
|
zed_LDFLAGS = -pthread
|
2016-11-08 02:01:38 +03:00
|
|
|
|
2014-01-22 01:30:03 +04:00
|
|
|
zedconfdir = $(sysconfdir)/zfs/zed.d
|
|
|
|
|
|
|
|
dist_zedconf_DATA = \
|
2014-06-10 01:55:31 +04:00
|
|
|
zed.d/zed-functions.sh \
|
|
|
|
zed.d/zed.rc
|
2014-01-22 01:30:03 +04:00
|
|
|
|
2018-06-07 19:59:59 +03:00
|
|
|
zedexecdir = $(zfsexecdir)/zed.d
|
2014-01-22 01:30:03 +04:00
|
|
|
|
|
|
|
dist_zedexec_SCRIPTS = \
|
2014-06-10 01:55:31 +04:00
|
|
|
zed.d/all-debug.sh \
|
|
|
|
zed.d/all-syslog.sh \
|
|
|
|
zed.d/data-notify.sh \
|
|
|
|
zed.d/generic-notify.sh \
|
2016-07-28 01:29:15 +03:00
|
|
|
zed.d/resilver_finish-notify.sh \
|
2016-10-19 22:55:59 +03:00
|
|
|
zed.d/scrub_finish-notify.sh \
|
|
|
|
zed.d/statechange-led.sh \
|
2016-11-11 00:52:59 +03:00
|
|
|
zed.d/statechange-notify.sh \
|
2017-02-11 03:09:45 +03:00
|
|
|
zed.d/vdev_clear-led.sh \
|
|
|
|
zed.d/vdev_attach-led.sh \
|
2018-02-23 22:38:05 +03:00
|
|
|
zed.d/pool_import-led.sh \
|
|
|
|
zed.d/resilver_finish-start-scrub.sh
|
2014-01-22 01:30:03 +04:00
|
|
|
|
2018-06-07 19:59:59 +03:00
|
|
|
nodist_zedexec_SCRIPTS = zed.d/history_event-zfs-list-cacher.sh
|
|
|
|
|
|
|
|
$(nodist_zedexec_SCRIPTS): %: %.in
|
2018-04-07 00:11:09 +03:00
|
|
|
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
|
|
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
|
|
-e 's,@sbindir\@,$(sbindir),g' \
|
|
|
|
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
|
|
$< >'$@'
|
|
|
|
|
2014-01-22 01:30:03 +04:00
|
|
|
zedconfdefaults = \
|
|
|
|
all-syslog.sh \
|
2015-02-27 03:26:25 +03:00
|
|
|
data-notify.sh \
|
2016-07-28 01:29:15 +03:00
|
|
|
resilver_finish-notify.sh \
|
2016-10-19 22:55:59 +03:00
|
|
|
scrub_finish-notify.sh \
|
2016-11-09 21:19:43 +03:00
|
|
|
statechange-led.sh \
|
2016-11-11 00:52:59 +03:00
|
|
|
statechange-notify.sh \
|
2017-02-11 03:09:45 +03:00
|
|
|
vdev_clear-led.sh \
|
|
|
|
vdev_attach-led.sh \
|
2018-02-23 22:38:05 +03:00
|
|
|
pool_import-led.sh \
|
|
|
|
resilver_finish-start-scrub.sh
|
2014-01-22 01:30:03 +04:00
|
|
|
|
2015-02-27 03:26:48 +03:00
|
|
|
install-data-hook:
|
2014-01-22 01:30:03 +04:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
|
|
|
|
for f in $(zedconfdefaults); do \
|
|
|
|
test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
|
|
|
|
-L "$(DESTDIR)$(zedconfdir)/$${f}" || \
|
|
|
|
ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
|
|
|
|
done
|
2015-02-27 03:26:48 +03:00
|
|
|
chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"
|