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

[Xen-devel] [PATCH 39/46] Move xenstored to libexec



xenstored is started by runlevel scripts, its not supposed to be
called by admin.  So move it out of the way into LIBEXEC_BIN.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 m4/xenstored.m4                                    | 8 ++++----
 tools/hotplug/FreeBSD/rc.d/xencommons.in           | 6 +++---
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 4 ++--
 tools/hotplug/NetBSD/rc.d/xencommons               | 6 +++---
 tools/ocaml/xenstored/Makefile                     | 4 ++--
 tools/xenstore/Makefile                            | 4 ++--
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/m4/xenstored.m4 b/m4/xenstored.m4
index 30b44c9..bbc8082 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=$LIBEXEC_BIN/oxenstored
        AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
                xenstore="xenstored"
-               xenstored=$SBINDIR/xenstored
+               xenstored=$LIBEXEC_BIN/xenstored
        ])
 ])
 
@@ -29,11 +29,11 @@ AC_ARG_WITH([xenstored],
        [
                AS_IF([test "x$withval" = "xxenstored"], [
                        xenstore=$withval
-                       xenstored=$SBINDIR/xenstored
+                       xenstored=$LIBEXEC_BIN/xenstored
                ])
                AS_IF([test "x$withval" = "xoxenstored"], [
                        xenstore=$withval
-                       xenstored=$SBINDIR/oxenstored
+                       xenstored=$LIBEXEC_BIN/oxenstored
                        AX_XEN_OCAML_XENSTORE_CHECK()
                ])
                AS_IF([test "x$withval" != "xoxenstored" && test "x$withval" != 
"xxenstored"], [
diff --git a/tools/hotplug/FreeBSD/rc.d/xencommons.in 
b/tools/hotplug/FreeBSD/rc.d/xencommons.in
index 88ff5b0..aaf0902 100644
--- a/tools/hotplug/FreeBSD/rc.d/xencommons.in
+++ b/tools/hotplug/FreeBSD/rc.d/xencommons.in
@@ -33,7 +33,7 @@ xen_startcmd()
        local time=0
        local timeout=30
 
-       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} 
${LIBEXEC_BIN}/xenstored)
        if test -z "$xenstored_pid"; then
                printf "Cleaning xenstore database.\n"
                if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -45,7 +45,7 @@ xen_startcmd()
                if [ -n "${XENSTORED_TRACE}" ]; then
                        XENSTORED_ARGS="${XENSTORED_ARGS} -T 
/var/log/xen/xenstored-trace.log"
                fi
-               ${SBINDIR}/xenstored ${XENSTORED_ARGS}
+               ${LIBEXEC_BIN}/xenstored ${XENSTORED_ARGS}
                while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / 
>/dev/null 2>&1` ; do
                        printf "."
                        time=$(($time+1))
@@ -83,7 +83,7 @@ xen_stop()
 
 xen_status()
 {
-       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} 
${LIBEXEC_BIN}/xenstored)
        if test -n ${xenstored_pid}; then
                pids="$pids $xenstored_pid"
        fi
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in 
b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index d423ff8..e0eb026 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
+#  * @LIBEXEC_BIN@/oxenstored
+#  * @LIBEXEC_BIN@/xenstored
 #
 # Changing this requires a reboot to take effect.
 #XENSTORED=@XENSTORED@
diff --git a/tools/hotplug/NetBSD/rc.d/xencommons 
b/tools/hotplug/NetBSD/rc.d/xencommons
index 16ec79b..f58e4ac 100644
--- a/tools/hotplug/NetBSD/rc.d/xencommons
+++ b/tools/hotplug/NetBSD/rc.d/xencommons
@@ -37,7 +37,7 @@ xen_startcmd()
        local time=0
        local timeout=30
 
-       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} 
${LIBEXEC_BIN}/xenstored)
        if test -z "$xenstored_pid"; then
                printf "Cleaning xenstore database.\n"
                if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -49,7 +49,7 @@ xen_startcmd()
                if [ -n "${XENSTORED_TRACE}" ]; then
                        XENSTORED_ARGS="${XENSTORED_ARGS} -T 
/var/log/xen/xenstored-trace.log"
                fi
-               ${SBINDIR}/xenstored ${XENSTORED_ARGS}
+               ${LIBEXEC_BIN}/xenstored ${XENSTORED_ARGS}
                while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / 
>/dev/null 2>&1` ; do
                        printf "."
                        time=$(($time+1))
@@ -87,7 +87,7 @@ xen_stop()
 
 xen_status()
 {
-       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} 
${LIBEXEC_BIN}/xenstored)
        if test -n ${xenstored_pid}; then
                pids="$pids $xenstored_pid"
        fi
diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index 18dedf7..ec36036 100644
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -73,8 +73,8 @@ bins: $(PROGRAMS)
 libs: $(LIBS)
 
 install: all
-       $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-       $(INSTALL_PROG) oxenstored $(DESTDIR)$(SBINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) oxenstored $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
        $(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR)
 
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 48f1e96..a3d8f8c 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -124,12 +124,12 @@ tarball: clean
 .PHONY: install
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-       $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
 ifeq ($(XENSTORE_XENSTORED),y)
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
-       $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
+       $(INSTALL_PROG) xenstored $(DESTDIR)$(LIBEXEC_BIN)
 endif
        $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
        $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)

_______________________________________________
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®.