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 3/3] Make xend start launch XenStore

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 3/3] Make xend start launch XenStore
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Thu, 04 Aug 2005 11:05:39 -0500
Delivery-date: Thu, 04 Aug 2005 19:54:59 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
The following patch makes tools/misc/xend start up the XenStore. It would be nicer to use init.d scripts to do this sort of stuff but this works for now.

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

Regards,

Anthony Liguori
diff -r 1d240086de52 tools/misc/xend
--- a/tools/misc/xend   Thu Aug  4 15:02:09 2005
+++ b/tools/misc/xend   Thu Aug  4 10:59:48 2005
@@ -114,6 +114,14 @@
         xcs_pidfile.close()
     except:
        return    
+
+def start_xenstored():
+    if os.fork() == 0:
+        os.execvp('/usr/sbin/xenstored', ['/usr/sbin/xenstored']);
+
+def start_consoled():
+    if os.fork() == 0:
+        os.execvp('/usr/sbin/consoled', ['/usr/sbin/consoled']);
             
 def main():
     try:
@@ -130,11 +138,13 @@
         return status >> 8
     elif sys.argv[1] == 'start':
         start_xcs()
-        if os.fork() == 0:
-            os.execvp('/usr/sbin/consoled', ['/usr/sbin/consoled']);
+        start_xenstored()
+        start_consoled()
         return daemon.start()
     elif sys.argv[1] == 'trace_start':
         start_xcs()
+        start_xenstored()
+        start_consoled()
         return daemon.start(trace=1)
     elif sys.argv[1] == 'stop':
         stop_xcs()
@@ -142,6 +152,8 @@
     elif sys.argv[1] == 'restart':
         stop_xcs()
         start_xcs()
+        start_xenstored()
+        start_consoled()
         return daemon.stop() or daemon.start()
     elif sys.argv[1] == 'status':
         return daemon.status()
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>