]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup with prefix and exec_prefix expanded.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 17 May 2017 15:04:05 +0000 (15:04 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 17 May 2017 15:04:05 +0000 (15:04 +0000)
git-svn-id: file:///svn/unbound/trunk@4172 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
contrib/unbound.service.in

index 34e755126e5e5ffb023223d7fdf7a549747c0c9c..8403d6bedc912edc7d50e3a3be94f150fcafe292 100755 (executable)
--- a/configure
+++ b/configure
@@ -757,6 +757,10 @@ UNBOUND_CHROOT_DIR
 UNBOUND_RUN_DIR
 ub_conf_dir
 ub_conf_file
+UNBOUND_LOCALSTATE_DIR
+UNBOUND_SYSCONF_DIR
+UNBOUND_SBIN_DIR
+UNBOUND_BIN_DIR
 EGREP
 GREP
 CPP
@@ -4111,6 +4115,11 @@ case "$prefix" in
                prefix="/usr/local"
         ;;
 esac
+case "$exec_prefix" in
+        NONE)
+               exec_prefix="/usr/local"
+        ;;
+esac
 
 # are we on MinGW?
 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
@@ -4122,6 +4131,14 @@ fi
 #
 # Determine configuration file
 # the eval is to evaluate shell expansion twice
+UNBOUND_BIN_DIR=`eval echo "${bindir}"`
+
+UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
+
+UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
+
+UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
+
 if test $on_mingw = "no"; then
   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
 else
index b76f745f874702169a5ea8c1bf95dc60120f2fa1..4409a26a492f303577c91a6d3676ad1dad7b4b51 100644 (file)
@@ -109,6 +109,11 @@ case "$prefix" in
                prefix="/usr/local"
         ;;
 esac
+case "$exec_prefix" in
+        NONE)
+               exec_prefix="/usr/local"
+        ;;
+esac
 
 # are we on MinGW?
 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
@@ -120,6 +125,14 @@ fi
 #
 # Determine configuration file
 # the eval is to evaluate shell expansion twice
+UNBOUND_BIN_DIR=`eval echo "${bindir}"`
+AC_SUBST(UNBOUND_BIN_DIR)
+UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
+AC_SUBST(UNBOUND_SBIN_DIR)
+UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
+AC_SUBST(UNBOUND_SYSCONF_DIR)
+UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
+AC_SUBST(UNBOUND_LOCALSTATE_DIR)
 if test $on_mingw = "no"; then
   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
 else
index 6008c1fce3ae7b9256963608a4973f88cad0b2bd..3ada5758c48f52765eae49f3d1c180e7f1d731f8 100644 (file)
@@ -6,8 +6,8 @@ Documentation=man:unbound(8)
 WantedBy=multi-user.target
 
 [Service]
-ExecReload=@bindir@/kill -HUP $MAINPID
-ExecStart=@sbindir@/unbound
+ExecReload=@UNBOUND_BIN_DIR@/kill -HUP $MAINPID
+ExecStart=@UNBOUND_SBIN_DIR@/unbound
 NotifyAccess=main
 Type=notify
 CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT
@@ -20,7 +20,7 @@ ProtectControlGroups=true
 ProtectKernelModules=true
 ProtectKernelTunables=true
 ProtectSystem=strict
-ReadWritePaths=@sysconfdir@ @localstatedir@ /run
+ReadWritePaths=@UNBOUND_SYSCONF_DIR@ @UNBOUND_LOCALSTATE_DIR@ /run @UNBOUND_RUN_DIR@
 RestrictAddressFamilies=AF_INET AF_UNIX
 RestrictRealtime=true
 SystemCallArchitectures=native