From: Olaf Hering Subject: [PATCH 39/46] Move xenstored to libexec Date: Mon, 22 Sep 2014 15:00:28 +0200 Message-ID: <1411390835-7348-40-git-send-email-olaf@aepfle.de> References: <1411390835-7348-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411390835-7348-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Keir Fraser , David Scott , Stefano Stabellini , George Dunlap , Tim Deegan , Ian Jackson , Jan Beulich , Samuel Thibault , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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)