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
This commit is contained in:
Antonio Russo
2018-06-07 12:59:59 -04:00
committed by Brian Behlendorf
parent fba33c3819
commit 39042f9736
10 changed files with 27 additions and 13 deletions
+8 -2
View File
@@ -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
+1 -3
View File
@@ -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