aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zed/Makefile.am7
-rw-r--r--cmd/zpool/Makefile.am2
-rw-r--r--config/user-libexec.m49
-rw-r--r--config/user.m41
-rw-r--r--configure.ac1
-rw-r--r--man/man8/Makefile.am2
-rw-r--r--man/man8/zed.8.in2
-rw-r--r--man/man8/zfs-mount-generator.8.in2
-rw-r--r--tests/zfs-tests/include/Makefile.am10
-rw-r--r--tests/zfs-tests/include/default.cfg.in4
10 files changed, 27 insertions, 13 deletions
diff --git a/cmd/zed/Makefile.am b/cmd/zed/Makefile.am
index e9e38d8e5..9c11315f2 100644
--- a/cmd/zed/Makefile.am
+++ b/cmd/zed/Makefile.am
@@ -54,14 +54,13 @@ dist_zedconf_DATA = \
zed.d/zed-functions.sh \
zed.d/zed.rc
-zedexecdir = $(libexecdir)/zfs/zed.d
+zedexecdir = $(zfsexecdir)/zed.d
dist_zedexec_SCRIPTS = \
zed.d/all-debug.sh \
zed.d/all-syslog.sh \
zed.d/data-notify.sh \
zed.d/generic-notify.sh \
- zed.d/history_event-zfs-list-cacher.sh \
zed.d/resilver_finish-notify.sh \
zed.d/scrub_finish-notify.sh \
zed.d/statechange-led.sh \
@@ -71,7 +70,9 @@ dist_zedexec_SCRIPTS = \
zed.d/pool_import-led.sh \
zed.d/resilver_finish-start-scrub.sh
-zed.d/history_event-zfs-list-cacher.sh: %: %.in
+nodist_zedexec_SCRIPTS = zed.d/history_event-zfs-list-cacher.sh
+
+$(nodist_zedexec_SCRIPTS): %: %.in
-$(SED) -e 's,@bindir\@,$(bindir),g' \
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sbindir\@,$(sbindir),g' \
diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am
index 8e98fddd6..c03da941d 100644
--- a/cmd/zpool/Makefile.am
+++ b/cmd/zpool/Makefile.am
@@ -21,7 +21,7 @@ zpool_LDADD = \
zpool_LDADD += -lm $(LIBBLKID)
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
-zpoolexecdir = $(libexecdir)/zfs/zpool.d
+zpoolexecdir = $(zfsexecdir)/zpool.d
EXTRA_DIST = zpool.d/README
diff --git a/config/user-libexec.m4 b/config/user-libexec.m4
new file mode 100644
index 000000000..31bcea3fc
--- /dev/null
+++ b/config/user-libexec.m4
@@ -0,0 +1,9 @@
+AC_DEFUN([ZFS_AC_CONFIG_USER_ZFSEXEC], [
+ AC_ARG_WITH(zfsexecdir,
+ AC_HELP_STRING([--with-zfsexecdir=DIR],
+ [install scripts [[@<:@libexecdir@:>@/zfs]]]),
+ [zfsexecdir=$withval],
+ [zfsexecdir="${libexecdir}/zfs"])
+
+ AC_SUBST([zfsexecdir])
+])
diff --git a/config/user.m4 b/config/user.m4
index f2f366e3c..8c4655719 100644
--- a/config/user.m4
+++ b/config/user.m4
@@ -17,6 +17,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
ZFS_AC_CONFIG_USER_RUNSTATEDIR
ZFS_AC_CONFIG_USER_MAKEDEV_IN_SYSMACROS
ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV
+ ZFS_AC_CONFIG_USER_ZFSEXEC
ZFS_AC_TEST_FRAMEWORK
diff --git a/configure.ac b/configure.ac
index b6fca99b4..486a97571 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,7 +183,6 @@ AC_CONFIG_FILES([
tests/zfs-tests/cmd/threadsappend/Makefile
tests/zfs-tests/cmd/xattrtest/Makefile
tests/zfs-tests/include/Makefile
- tests/zfs-tests/include/default.cfg
tests/zfs-tests/tests/Makefile
tests/zfs-tests/tests/functional/Makefile
tests/zfs-tests/tests/functional/acl/Makefile
diff --git a/man/man8/Makefile.am b/man/man8/Makefile.am
index 153cd518f..5401ff06f 100644
--- a/man/man8/Makefile.am
+++ b/man/man8/Makefile.am
@@ -19,7 +19,7 @@ EXTRA_DIST = \
zfs-mount-generator.8.in
$(nodist_man_MANS): %: %.in
- -$(SED) -e 's,@libexecdir\@,$(libexecdir),g' \
+ -$(SED) -e 's,@zfsexecdir\@,$(zfsexecdir),g' \
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'
diff --git a/man/man8/zed.8.in b/man/man8/zed.8.in
index 645e91795..097a8f4a7 100644
--- a/man/man8/zed.8.in
+++ b/man/man8/zed.8.in
@@ -201,7 +201,7 @@ The default directory for enabled ZEDLETs.
.I @sysconfdir@/zfs/zed.d/zed.rc
The default rc file for common variables used by ZEDLETs.
.TP
-.I @libexecdir@/zfs/zed.d
+.I @zfsexecdir@/zed.d
The default directory for installed ZEDLETs.
.TP
.I @runstatedir@/zed.pid
diff --git a/man/man8/zfs-mount-generator.8.in b/man/man8/zfs-mount-generator.8.in
index 319ac8e57..79720601d 100644
--- a/man/man8/zfs-mount-generator.8.in
+++ b/man/man8/zfs-mount-generator.8.in
@@ -56,7 +56,7 @@ touch
Then, enable the tracking ZEDLET:
.PP
.RS 4
-ln -s "@libexecdir@/zfs/zed.d/history_event-zfs-list-cacher.sh" "@sysconfdir@/zfs/zed.d/"
+ln -s "@zfsexecdir@/zed.d/history_event-zfs-list-cacher.sh" "@sysconfdir@/zfs/zed.d"
systemctl enable zed.service
diff --git a/tests/zfs-tests/include/Makefile.am b/tests/zfs-tests/include/Makefile.am
index 52e1c0a9f..41e105287 100644
--- a/tests/zfs-tests/include/Makefile.am
+++ b/tests/zfs-tests/include/Makefile.am
@@ -2,13 +2,19 @@ pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/include
dist_pkgdata_DATA = \
blkdev.shlib \
commands.cfg \
- default.cfg \
libtest.shlib \
math.shlib \
properties.shlib \
zpool_script.shlib
-EXTRA_DIST=default.cfg.in
+EXTRA_DIST = default.cfg.in
+
+nodist_pkgdata_DATA = default.cfg
+
+$(nodist_pkgdata_DATA): %: %.in
+ -$(SED) -e 's,@zfsexecdir\@,$(zfsexecdir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ $< >'$@'
distclean-local::
-$(RM) default.cfg
diff --git a/tests/zfs-tests/include/default.cfg.in b/tests/zfs-tests/include/default.cfg.in
index 90d1d8bd6..e1e2a7e91 100644
--- a/tests/zfs-tests/include/default.cfg.in
+++ b/tests/zfs-tests/include/default.cfg.in
@@ -33,10 +33,8 @@
. $STF_SUITE/include/libtest.shlib
# ZFS Directories
-export prefix=@prefix@
-export exec_prefix=@exec_prefix@
export ZEDLET_ETC_DIR=${ZEDLET_ETC_DIR:-@sysconfdir@/zfs/zed.d}
-export ZEDLET_LIBEXEC_DIR=${ZEDLET_LIBEXEC_DIR:-@libexecdir@/zfs/zed.d}
+export ZEDLET_LIBEXEC_DIR=${ZEDLET_LIBEXEC_DIR:-@zfsexecdir@/zed.d}
export ZPOOL_SCRIPT_DIR=${ZPOOL_SCRIPT_DIR:-@sysconfdir@/zfs/zpool.d}
# Define run length constants