From dc071e55135019d4503930f204674219a9f8676b Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 21 Aug 2016 14:53:57 +1000 Subject: [PATCH] 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 --- configure.ac | 6 ++++++ systemd/nfs-config.service | 13 ------------- systemd/nfs-config.service.in | 13 +++++++++++++ 3 files changed, 19 insertions(+), 13 deletions(-) --- 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 --- 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 --- /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