... 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 ]
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@
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
-LIBDIR
LIBEXEC
-SBINDIR
-BINDIR
host_os
host_vendor
host_cpu
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
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
SHAREDIR=$prefix/share
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
case "$host_os" in
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
;;
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
esac
AC_SUBST(LIBEXEC)
-LIBDIR=`eval echo $libdir`
-AC_SUBST(LIBDIR)
-
XEN_RUN_DIR=/var/run/xen
AC_SUBST(XEN_RUN_DIR)
SHAREDIR=$prefix/share
AC_SUBST(SHAREDIR)
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
AC_SUBST(PRIVATE_PREFIX)
case "$host_os" in
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
])
])
[
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"], [
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
-LIBDIR
LIBEXEC
-SBINDIR
-BINDIR
FILE_OFFSET_BITS
OBJEXT
EXEEXT
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
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
SHAREDIR=$prefix/share
-PRIVATE_PREFIX=$LIBDIR/xen
+PRIVATE_PREFIX=`eval echo $libdir`
case "$host_os" in
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 :
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
# 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@
[Service]
Type=forking
-ExecStart=@SBINDIR@/xenwatchdogd 30 15
+ExecStart=@sbindir@/xenwatchdogd 30 15
KillSignal=USR1
[Install]
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
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