From 8cf1e023c9c110087c79daac0a083b5e04458304 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 24 Aug 2016 10:13:52 -0400 Subject: Make location of nfs-utils_env.sh configurable. A recent patch moved this file to /usr/libexec/... That directory isn't universal, and doesn't exist on openSUSE or Debian for example. So change it to use the $libexecdir directory determined by configure Signed-off-by: NeilBrown Signed-off-by: Steve Dickson --- .gitignore | 1 + configure.ac | 6 ++++++ systemd/nfs-config.service | 13 ------------- systemd/nfs-config.service.in | 13 +++++++++++++ 4 files changed, 20 insertions(+), 13 deletions(-) delete mode 100644 systemd/nfs-config.service create mode 100644 systemd/nfs-config.service.in 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 deleted file mode 100644 index bd69e84..0000000 --- a/systemd/nfs-config.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Preprocess NFS configuration -After=local-fs.target -DefaultDependencies=no - -[Service] -Type=oneshot -# This service needs to run any time any nfs service -# is started, so changes to local config files get -# incorporated. Having "RemainAfterExit=no" (the default) -# ensures this happens. -RemainAfterExit=no -ExecStart=/usr/libexec/nfs-utils/nfs-utils_env.sh diff --git a/systemd/nfs-config.service.in b/systemd/nfs-config.service.in new file mode 100644 index 0000000..e89dc54 --- /dev/null +++ b/systemd/nfs-config.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Preprocess NFS configuration +After=local-fs.target +DefaultDependencies=no + +[Service] +Type=oneshot +# This service needs to run any time any nfs service +# is started, so changes to local config files get +# incorporated. Having "RemainAfterExit=no" (the default) +# ensures this happens. +RemainAfterExit=no +ExecStart=@_libexecdir@/nfs-utils/nfs-utils_env.sh -- cgit