summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--configure.ac6
-rw-r--r--systemd/nfs-config.service.in (renamed from systemd/nfs-config.service)2
3 files changed, 8 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 3d9640d..c247561 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,6 +70,7 @@ tests/nsm_client/nlm_sm_inter_svc.c
tests/nsm_client/nlm_sm_inter_xdr.c
utils/nfsidmap/nfsidmap
systemd/nfs-server-generator
+systemd/nfs-config.service
# cscope database files
cscope.*
# generic editor backup et al
diff --git a/configure.ac b/configure.ac
index 1daf5b8..4fb108f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -511,8 +511,14 @@ AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
# Make sure that $ACLOCAL_FLAGS are used during a rebuild
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
+# make libexecdir available for substituion in config files
+# 2 "evals" needed late to expand variable names.
+AC_SUBST([_libexecdir])
+AC_CONFIG_COMMANDS_PRE([eval eval _libexecdir=$libexecdir])
+
AC_CONFIG_FILES([
Makefile
+ systemd/nfs-config.service
linux-nfs/Makefile
support/Makefile
support/export/Makefile
diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service.in
index bd69e84..e89dc54 100644
--- a/systemd/nfs-config.service
+++ b/systemd/nfs-config.service.in
@@ -10,4 +10,4 @@ Type=oneshot
# incorporated. Having "RemainAfterExit=no" (the default)
# ensures this happens.
RemainAfterExit=no
-ExecStart=/usr/libexec/nfs-utils/nfs-utils_env.sh
+ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh