aboutsummaryrefslogtreecommitdiff
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
authorAntonio Russo <antonio.e.russo@gmail.com>2018-06-07 16:59:59 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2018-06-07 16:59:59 +0000
commit39042f97365c0e677e5e77ded90372526422afdf (patch)
treefeaf6e681cc3b9bd677bfd442b4e54e14c1b8a33 /tests/zfs-tests/include
parentfba33c3819761487a75c8f1307482959105a6269 (diff)
downloadsrc-39042f97365c0e677e5e77ded90372526422afdf.tar.gz
src-39042f97365c0e677e5e77ded90372526422afdf.zip
Tunable directory for zfs runtime scripts
zpool and zed place scripts in subdirectories of libexecdir. Some distributions locate architecture independent scripts in other locations (e.g. Debian). To avoid these paths getting out of sync, centralize the definitions. Build zfs-test's default.cfg by Makefile. Use the new directory logic building tests/zfs-tests/include/default.cfg.in. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com> Closes #7597
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/Makefile.am10
-rw-r--r--tests/zfs-tests/include/default.cfg.in4
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/zfs-tests/include/Makefile.am b/tests/zfs-tests/include/Makefile.am
index 52e1c0a9f517..41e105287b48 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 90d1d8bd69b3..e1e2a7e91f9c 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