WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 9 of 9] rc.d NetBSD: don't start xenbackendd by defau

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 9 of 9] rc.d NetBSD: don't start xenbackendd by default, only when xend needs it
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 14 Oct 2011 15:35:41 +0200
Delivery-date: Fri, 14 Oct 2011 06:47:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to; bh=cw52vnaBmoiRJ3ogEj3JIqphBiRZL5hCTD6dPQCosYM=; b=HfgxULNRgipDhpXUJp2NO0h2g+NiVW5zqxASsl/Tj9jwbfEBx3U3er1LFlJcxqhj+v jRAgi8ObtIBmlbaT6WUUGAR6t/u/1HohiVPzl36ssB1TfW/aBBNa8gSjEHxGSBdvlUNR O5rWxH+GjlirevMx1UNb9UiL6rlKo3fsuc+sc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1318599332@loki>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1318599332@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.9.2
# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317386335 -7200
# Node ID 40f928cba711eed3823158bc6aa1c8f5ea54bfb1
# Parent  07502345baca44478e3086515a071b24c5aa9a33
rc.d NetBSD: don't start xenbackendd by default, only when xend needs it.

With the move of hotplug scripts from xenbackendd to libxl xenbackendd is no 
longer needed by libxl, only start it when xend is started.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 07502345baca -r 40f928cba711 tools/hotplug/NetBSD/rc.d/xenbackendd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/hotplug/NetBSD/rc.d/xenbackendd     Fri Sep 30 14:38:55 2011 +0200
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# PROVIDE: xenbackendd
+# REQUIRE: xencommons
+
+. /etc/rc.subr
+
+DIR=$(dirname "$0")
+. "${DIR}/xen-hotplugpath.sh"
+
+LD_LIBRARY_PATH="${LIBDIR}"
+export LD_LIBRARY_PATH PYTHONPATH
+PATH="${PATH}:${SBINDIR}"
+export PATH
+
+name="xenbackendd"
+rcvar=$name
+command="${SBINDIR}/xenbackendd"
+if [ -n "${XENBACKENDD_DEBUG}" ]; then
+       command_args="${XENBACKENDD_ARGS} -d"
+else
+       command_args="${XENBACKENDD_ARGS}"
+fi
+
+load_rc_config $name
+run_rc_command "$1"
+
diff -r 07502345baca -r 40f928cba711 tools/hotplug/NetBSD/rc.d/xencommons
--- a/tools/hotplug/NetBSD/rc.d/xencommons      Fri Oct 14 14:38:12 2011 +0200
+++ b/tools/hotplug/NetBSD/rc.d/xencommons      Fri Sep 30 14:38:55 2011 +0200
@@ -22,8 +22,6 @@ required_files="/kern/xen/privcmd"
 
 XENSTORED_PIDFILE="/var/run/xenstored.pid"
 XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid"
-XENBACKENDD_PIDFILE="/var/run/xenbackendd.pid"
-#XENBACKENDD_DEBUG=1
 #XENCONSOLED_TRACE="/var/log/xen/xenconsole-trace.log"
 #XENSTORED_TRACE="/var/log/xen/xenstore-trace.log"
 
@@ -46,7 +44,7 @@ xen_startcmd()
                        XENSTORED_ROOTDIR="/var/lib/xenstored"
                fi
                rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
-               printf "Starting xenservices: xenstored, xenconsoled, 
xenbackendd."
+               printf "Starting xenservices: xenstored, xenconsoled."
                XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
                if [ -n "${XENSTORED_TRACE}" ]; then
                        XENSTORED_ARGS="${XENSTORED_ARGS} -T 
/var/log/xen/xenstored-trace.log"
@@ -58,7 +56,7 @@ xen_startcmd()
                        sleep 1
                done
        else
-               printf "Starting xenservices: xenconsoled, xenbackendd."
+               printf "Starting xenservices: xenconsoled."
        fi
 
        XENCONSOLED_ARGS=""
@@ -68,13 +66,6 @@ xen_startcmd()
 
        ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
 
-       XENBACKENDD_ARGS=""
-       if [ -n "${XENBACKENDD_DEBUG}" ]; then
-               XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
-       fi
-
-       ${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
-
        printf "\n"
 
        printf "Setting domain 0 name.\n"
@@ -87,8 +78,6 @@ xen_stop()
        printf "Stopping xencommons.\n"
        printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
 
-       rc_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
-       pids="$pids $rc_pid"
        rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
        pids="$pids $rc_pid"
 
@@ -108,17 +97,12 @@ xen_status()
                pids="$pids $xenconsoled_pid"
        fi
 
-       xenbackend_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} 
${SBINDIR}/xenbackendd)
-       if test -n ${xenbackend_pid}; then
-               pids="$pids $xenbackend_pid"
-       fi
-
-       if test -n "$xenbackend_pid" -a -n "$xenconsoled_pid" -a -n 
"$xenstored_pid";
+       if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
        then
                echo "xencommons are running as pids $pids."
                return 0
        fi
-       if test -z "$xenbackend_pid" -a -z "$xenconsoled_pid" -a -z 
"$xenstored_pid";
+       if test -z "$xenconsoled_pid" -a -z "$xenstored_pid";
        then
                echo "xencommons are not running."
                return 0
@@ -134,11 +118,6 @@ xen_status()
        else
                echo "xenconsoled is not running."
        fi
-       if test -n $xenbackend_pid; then
-               echo "xenbackendd is running as pid $xenbackend_pid."
-       else
-               echo "xenbackendd is not running."
-       fi
 }
 
 load_rc_config $name
diff -r 07502345baca -r 40f928cba711 tools/hotplug/NetBSD/rc.d/xend
--- a/tools/hotplug/NetBSD/rc.d/xend    Fri Oct 14 14:38:12 2011 +0200
+++ b/tools/hotplug/NetBSD/rc.d/xend    Fri Sep 30 14:38:55 2011 +0200
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # PROVIDE: xend
-# REQUIRE: xencommons
+# REQUIRE: xencommons xenbackendd
 
 . /etc/rc.subr
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel