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

[Xen-changelog] [xen-unstable] xend: Allow xenconsoled to be passed arguments at startup



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1218631350 -3600
# Node ID 644a9d219973b9b21fd0590eec38370f4fb8caae
# Parent  60af813ea4589fd7006eb001c2ee6cef90c639ac
xend: Allow xenconsoled to be passed arguments at startup

Attached patch allows to pass arguments to xenconsoled
via XENCONSOLED_TRACE env. variable analogous to xenstored.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/misc/xend |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff -r 60af813ea458 -r 644a9d219973 tools/misc/xend
--- a/tools/misc/xend   Wed Aug 13 13:40:38 2008 +0100
+++ b/tools/misc/xend   Wed Aug 13 13:42:30 2008 +0100
@@ -77,6 +77,10 @@ def check_user():
         hline()
         raise CheckError("invalid user")
 
+def start_daemon(daemon, *args):
+    if os.fork() == 0:
+        os.execvp(daemon, (daemon,) + args)
+
 def start_xenstored():
     pidfname = "/var/run/xenstore.pid"
     try:
@@ -102,13 +106,15 @@ def start_xenstored():
     s,o = commands.getstatusoutput(cmd)
 
 def start_consoled():
-    if os.fork() == 0:
-        os.execvp('xenconsoled', ['xenconsoled'])
+    XENCONSOLED_TRACE = os.getenv("XENCONSOLED_TRACE")
+    args = ""
+    if XENCONSOLED_TRACE:
+        args += "--log=" + XENCONSOLED_TRACE
+    start_daemon("xenconsoled", args)
 
 def start_blktapctrl():
-    if os.fork() == 0:
-        os.execvp('blktapctrl', ['blktapctrl'])
-            
+    start_daemon("blktapctrl", "")
+
 def main():
     try:
         check_logging()

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.