aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2014-10-01 18:41:13 +0200
committerIan Campbell <ian.campbell@citrix.com>2014-10-06 15:54:49 +0100
commit6288e2c1cb432cedbd40c4a5b9f62366fc5f8e52 (patch)
treebbd167d575b12b90ea85ac0b7572452def5779ce
parent436a0cc876254132536eaacfc637029dc047cb1c (diff)
tools: substitute bindir instead of BINDIR
... and same for sbindir and libdir. Expand usage of exec_prefix so that it does not appear in substituted variables in systemd files. Signed-off-by: Olaf Hering <olaf@aepfle.de> Akced-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> [ ijc -- ran autogen.sh as requested ]
-rw-r--r--config/Paths.mk.in6
-rwxr-xr-xconfigure17
-rw-r--r--m4/paths.m415
-rw-r--r--m4/xenstored.m48
-rwxr-xr-xtools/configure25
-rw-r--r--tools/hotplug/Linux/init.d/sysconfig.xencommons.in4
-rw-r--r--tools/hotplug/Linux/systemd/xen-watchdog.service.in2
-rw-r--r--tools/hotplug/Linux/systemd/xenconsoled.service.in2
-rw-r--r--tools/hotplug/Linux/systemd/xenstored.service.in4
9 files changed, 30 insertions, 53 deletions
diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index 65ca37b1b3..c3c9897b51 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -29,12 +29,12 @@ includedir := @includedir@
localstatedir := @localstatedir@
sysconfdir := @sysconfdir@
-SBINDIR := @SBINDIR@
-BINDIR := @BINDIR@
+SBINDIR := $(sbindir)
+BINDIR := $(bindir)
LIBEXEC := @LIBEXEC@
SHAREDIR := @SHAREDIR@
-LIBDIR := @LIBDIR@
+LIBDIR := $(libdir)
XEN_RUN_DIR := @XEN_RUN_DIR@
XEN_LOG_DIR := @XEN_LOG_DIR@
diff --git a/configure b/configure
index 6b01c35013..d24d1636b4 100755
--- a/configure
+++ b/configure
@@ -607,10 +607,7 @@ SHAREDIR
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
-LIBDIR
LIBEXEC
-SBINDIR
-BINDIR
host_os
host_vendor
host_cpu
@@ -1858,6 +1855,9 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
case "$host_os" in
@@ -1897,21 +1897,12 @@ else
fi
-BINDIR=$prefix/bin
-
-
-SBINDIR=$prefix/sbin
-
-
case "$host_os" in
*netbsd*) LIBEXEC=$prefix/libexec ;;
*) LIBEXEC=$prefix/lib/xen/bin ;;
esac
-LIBDIR=`eval echo $libdir`
-
-
XEN_RUN_DIR=/var/run/xen
@@ -1924,7 +1915,7 @@ XEN_LIB_STORED=/var/lib/xenstored
SHAREDIR=$prefix/share
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
case "$host_os" in
diff --git a/m4/paths.m4 b/m4/paths.m4
index 178b9a993a..a9c6ebd23b 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -2,6 +2,10 @@ AC_DEFUN([AX_XEN_EXPAND_CONFIG], [
dnl expand these early so we can use this for substitutions
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+dnl expand exec_prefix or it will endup in substituted variables
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
dnl
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
@@ -39,12 +43,6 @@ AC_ARG_WITH([initddir],
;;
esac])
-BINDIR=$prefix/bin
-AC_SUBST(BINDIR)
-
-SBINDIR=$prefix/sbin
-AC_SUBST(SBINDIR)
-
dnl XXX: this should be changed to use the passed $libexec
dnl but can be done as a second step
case "$host_os" in
@@ -53,9 +51,6 @@ case "$host_os" in
esac
AC_SUBST(LIBEXEC)
-LIBDIR=`eval echo $libdir`
-AC_SUBST(LIBDIR)
-
XEN_RUN_DIR=/var/run/xen
AC_SUBST(XEN_RUN_DIR)
@@ -68,7 +63,7 @@ AC_SUBST(XEN_LIB_STORED)
SHAREDIR=$prefix/share
AC_SUBST(SHAREDIR)
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
AC_SUBST(PRIVATE_PREFIX)
case "$host_os" in
diff --git a/m4/xenstored.m4 b/m4/xenstored.m4
index 30b44c9757..b268fc2b61 100644
--- a/m4/xenstored.m4
+++ b/m4/xenstored.m4
@@ -6,10 +6,10 @@ AC_DEFUN([AX_XEN_OCAML_XENSTORE_CHECK], [
AC_DEFUN([AX_XEN_OCAML_XENSTORE_DEFAULTS], [
xenstore="oxenstored"
- xenstored=$SBINDIR/oxenstored
+ xenstored=$sbindir/oxenstored
AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
xenstore="xenstored"
- xenstored=$SBINDIR/xenstored
+ xenstored=$sbindir/xenstored
])
])
@@ -29,11 +29,11 @@ AC_ARG_WITH([xenstored],
[
AS_IF([test "x$withval" = "xxenstored"], [
xenstore=$withval
- xenstored=$SBINDIR/xenstored
+ xenstored=$sbindir/xenstored
])
AS_IF([test "x$withval" = "xoxenstored"], [
xenstore=$withval
- xenstored=$SBINDIR/oxenstored
+ xenstored=$sbindir/oxenstored
AX_XEN_OCAML_XENSTORE_CHECK()
])
AS_IF([test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"], [
diff --git a/tools/configure b/tools/configure
index 509d5ef1d7..f18a579de8 100755
--- a/tools/configure
+++ b/tools/configure
@@ -720,10 +720,7 @@ SHAREDIR
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
-LIBDIR
LIBEXEC
-SBINDIR
-BINDIR
FILE_OFFSET_BITS
OBJEXT
EXEEXT
@@ -3693,6 +3690,9 @@ esac
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
+bindir=`eval echo $bindir`
+sbindir=`eval echo $sbindir`
+libdir=`eval echo $libdir`
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
case "$host_os" in
@@ -3732,21 +3732,12 @@ else
fi
-BINDIR=$prefix/bin
-
-
-SBINDIR=$prefix/sbin
-
-
case "$host_os" in
*netbsd*) LIBEXEC=$prefix/libexec ;;
*) LIBEXEC=$prefix/lib/xen/bin ;;
esac
-LIBDIR=`eval echo $libdir`
-
-
XEN_RUN_DIR=/var/run/xen
@@ -3759,7 +3750,7 @@ XEN_LIB_STORED=/var/lib/xenstored
SHAREDIR=$prefix/share
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
case "$host_os" in
@@ -6076,13 +6067,13 @@ if test "${with_xenstored+set}" = set; then :
if test "x$withval" = "xxenstored"; then :
xenstore=$withval
- xenstored=$SBINDIR/xenstored
+ xenstored=$sbindir/xenstored
fi
if test "x$withval" = "xoxenstored"; then :
xenstore=$withval
- xenstored=$SBINDIR/oxenstored
+ xenstored=$sbindir/oxenstored
if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
@@ -6102,11 +6093,11 @@ else
xenstore="oxenstored"
- xenstored=$SBINDIR/oxenstored
+ xenstored=$sbindir/oxenstored
if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
xenstore="xenstored"
- xenstored=$SBINDIR/xenstored
+ xenstored=$sbindir/xenstored
fi
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index d423ff8b99..4d76d6b99e 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -14,8 +14,8 @@
# the XENSTORED variable there.
#
# This can be either of:
-# * @SBINDIR@/oxenstored
-# * @SBINDIR@/xenstored
+# * @sbindir@/oxenstored
+# * @sbindir@/xenstored
#
# Changing this requires a reboot to take effect.
#XENSTORED=@XENSTORED@
diff --git a/tools/hotplug/Linux/systemd/xen-watchdog.service.in b/tools/hotplug/Linux/systemd/xen-watchdog.service.in
index acb2b775a6..ee77bf97ae 100644
--- a/tools/hotplug/Linux/systemd/xen-watchdog.service.in
+++ b/tools/hotplug/Linux/systemd/xen-watchdog.service.in
@@ -6,7 +6,7 @@ ConditionVirtualization=xen
[Service]
Type=forking
-ExecStart=@SBINDIR@/xenwatchdogd 30 15
+ExecStart=@sbindir@/xenwatchdogd 30 15
KillSignal=USR1
[Install]
diff --git a/tools/hotplug/Linux/systemd/xenconsoled.service.in b/tools/hotplug/Linux/systemd/xenconsoled.service.in
index 15fad3504f..7ca0264690 100644
--- a/tools/hotplug/Linux/systemd/xenconsoled.service.in
+++ b/tools/hotplug/Linux/systemd/xenconsoled.service.in
@@ -14,7 +14,7 @@ EnvironmentFile=-/etc/sysconfig/xenconsoled
PIDFile=@XEN_RUN_DIR@/xenconsoled.pid
ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStartPre=/bin/mkdir -p ${XENCONSOLED_LOG_DIR}
-ExecStart=@SBINDIR@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
+ExecStart=@sbindir@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
[Install]
WantedBy=multi-user.target
diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
index 4a9fcee009..013e69e792 100644
--- a/tools/hotplug/Linux/systemd/xenstored.service.in
+++ b/tools/hotplug/Linux/systemd/xenstored.service.in
@@ -17,8 +17,8 @@ ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStartPre=-/bin/rm -f @XEN_LIB_STORED@/tdb*
ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
ExecStart=/bin/sh -c "exec $XENSTORED --no-fork $XENSTORED_ARGS"
-ExecStartPost=-@BINDIR@/xenstore-write "/local/domain/0/name" "Domain-0"
-ExecStartPost=-@BINDIR@/xenstore-write "/local/domain/0/domid" 0
+ExecStartPost=-@bindir@/xenstore-write "/local/domain/0/name" "Domain-0"
+ExecStartPost=-@bindir@/xenstore-write "/local/domain/0/domid" 0
[Install]
WantedBy=multi-user.target