[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 11/28] 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.

Please rerun autogen.sh after applying this patch.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Akced-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 config/Paths.mk.in                                  |  6 +++---
 m4/paths.m4                                         | 15 +++++----------
 m4/xenstored.m4                                     |  8 ++++----
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in  |  4 ++--
 tools/hotplug/Linux/systemd/xen-watchdog.service.in |  2 +-
 tools/hotplug/Linux/systemd/xenconsoled.service.in  |  2 +-
 tools/hotplug/Linux/systemd/xenstored.service.in    |  4 ++--
 7 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index 65ca37b..c3c9897 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/m4/paths.m4 b/m4/paths.m4
index 178b9a9..a9c6ebd 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 30b44c9..b268fc2 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/hotplug/Linux/init.d/sysconfig.xencommons.in 
b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index d423ff8..4d76d6b 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 acb2b77..ee77bf9 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 15fad35..7ca0264 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 4a9fcee..013e69e 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.