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] Enable to set the environment variables in /etc/sysc

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Enable to set the environment variables in /etc/sysconfig/xend
From: "SUZUKI, Kazuhiro" <kaz@xxxxxxxxxxxxxx>
Date: Mon, 07 Sep 2009 16:43:24 +0900 (JST)
Delivery-date: Mon, 07 Sep 2009 00:43:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,

The attached patch enables to set the environment variables for xend
in /etc/sysconfig/xend.

There are four variables.

XENCONSOLED_TRACE=[none|guest|hv|all]
XENSTORED_ROOTDIR=/var/lib/xenstored
XENSTORED_TRACE=[yes|on|1]
XENBACKENDD_DEBUG=[yes|on|1]

The XENCONSOLED_TRACE and XENSTORED_ROOTDIR take strings for each
command's options. And if thease variables have non-zero strings, then
export them.
If the XENSTORED_TRACE and XENBACKENDD_DEBUG take either "yes", "on"
or "1" then export them.
diff -r ead107bc25cb tools/hotplug/Linux/Makefile
--- a/tools/hotplug/Linux/Makefile      Fri Sep 04 08:43:05 2009 +0100
+++ b/tools/hotplug/Linux/Makefile      Mon Sep 07 16:21:42 2009 +0900
@@ -3,6 +3,7 @@
 
 # Init scripts.
 XEND_INITD = init.d/xend
+XEND_SYSCONFIG = init.d/sysconfig.xend
 XENDOMAINS_INITD = init.d/xendomains
 XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
 
@@ -62,6 +63,7 @@
        [ -d $(DESTDIR)$(CONFIG_DIR)/init.d ] || $(INSTALL_DIR) 
$(DESTDIR)$(CONFIG_DIR)/init.d
        [ -d $(DESTDIR)$(CONFIG_DIR)/sysconfig ] || $(INSTALL_DIR) 
$(DESTDIR)$(CONFIG_DIR)/sysconfig
        $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d
+       $(INSTALL_PROG) $(XEND_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysconfig/xend
        $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d
        $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) 
$(DESTDIR)$(CONFIG_DIR)/sysconfig/xendomains
 
diff -r ead107bc25cb tools/hotplug/Linux/init.d/sysconfig.xend
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/hotplug/Linux/init.d/sysconfig.xend Mon Sep 07 16:21:42 2009 +0900
@@ -0,0 +1,11 @@
+# Log xenconsoled messages (cf xm dmesg)
+#XENCONSOLED_TRACE=[none|guest|hv|all]
+
+# Log xenstored messages
+#XENSTORED_TRACE=[yes|on|1]
+
+# Running xenstored on XENSTORED_ROOTDIR
+#XENSTORED_ROOTDIR=/var/lib/xenstored
+
+# Running xenbackendd in debug mode
+#XENBACKENDD_DEBUG=[yes|on|1]
diff -r ead107bc25cb tools/hotplug/Linux/init.d/xend
--- a/tools/hotplug/Linux/init.d/xend   Fri Sep 04 08:43:05 2009 +0100
+++ b/tools/hotplug/Linux/init.d/xend   Mon Sep 07 16:21:42 2009 +0900
@@ -18,6 +18,9 @@
 # Short-Description: Start/stop xend
 # Description:       Starts and stops the Xen control daemon.
 ### END INIT INFO
+
+shopt -s extglob
+test -f /etc/sysconfig/xend && . /etc/sysconfig/xend
 
 if ! grep -q "control_d" /proc/xen/capabilities ; then
        exit 0
@@ -41,6 +44,10 @@
   start)
        mkdir -p /var/lock/subsys
        touch /var/lock/subsys/xend
+       test -z "$XENSTORED_ROOTDIR" || export XENSTORED_ROOTDIR
+       test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
+       [[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
+       [[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export XENBACKENDD_DEBUG
        xend start
        await_daemons_up
        ;;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Enable to set the environment variables in /etc/sysconfig/xend, SUZUKI, Kazuhiro <=