All of lore.kernel.org
 help / color / mirror / Atom feed
From: ShaunR <mailinglists@unix-scripts.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] for xend init script and xend python script
Date: Fri, 22 Oct 2010 12:47:26 -0700	[thread overview]
Message-ID: <i9spod$lfi$1@dough.gmane.org> (raw)

This patch does the following, hopefully it will be added to future 
versions.

* xend init script will now send SIGINT to xenconsoled when stop is 
issued so that the xenconsoled daemon is also stopped (this is required 
if the new options below are added to /etc/sysconfig/xend

* /etc/sysconfig/xend has additional these additional cosnole options 
since the xend init script starts xenconsoled.
	XENCONSOLED_LOG=(none|guest|hv|all)
	XENCONSOLED_LOGDIR=PATH
	XENCONSOLED_TIMESTAMP=(none|guest|hv|all)
	XENCONSOLED_OVERFLOW=(discard|keep)
	XENCONSOLED_PIDFILE=PATH

* xend python script now checks for the options above and passed them to 
xenconsoled




--- tools/misc/xend.orig        2010-10-22 12:25:46.000000000 -0700
+++ tools/misc/xend     2010-10-22 12:26:12.000000000 -0700
@@ -99,9 +99,24 @@

  def start_consoled():
      XENCONSOLED_TRACE = os.getenv("XENCONSOLED_TRACE")
+    XENCONSOLED_LOG = os.getenv("XENCONSOLED_LOG")
+    XENCONSOLED_LOGDIR = os.getenv("XENCONSOLED_LOGDIR")
+    XENCONSOLED_TIMESTAMP = os.getenv("XENCONSOLED_TIMESTAMP")
+    XENCONSOLED_OVERFLOW = os.getenv("XENCONSOLED_OVERFLOW")
+    XENCONSOLED_PIDFILE = os.getenv("XENCONSOLED_PIDFILE")
      args = ""
      if XENCONSOLED_TRACE:
-        args += "--log=" + XENCONSOLED_TRACE
+        args += "--log=" + XENCONSOLED_TRACE + " "
+    elif XENCONSOLED_LOG:
+        args += "--log=" + XENCONSOLED_LOG + " "
+    if XENCONSOLED_LOGDIR:
+        args += "--log-dir=" + XENCONSOLED_LOGDIR + " "
+    if XENCONSOLED_TIMESTAMP:
+        args += "--timestamp=" + XENCONSOLED_TIMESTAMP + " "
+    if XENCONSOLED_OVERFLOW:
+        args += "--overflow=" + XENCONSOLED_OVERFLOW + " "
+    if XENCONSOLED_PIDFILE:
+        args += "--pid-file=" + XENCONSOLED_PIDFILE + " "
      start_daemon("xenconsoled", args)

  def start_blktapctrl():


--- tools/hotplug/Linux/init.d/xend.orig        2010-10-22 
12:26:50.000000000 -0700
+++ tools/hotplug/Linux/init.d/xend     2010-10-22 12:28:42.000000000 -0700
@@ -55,6 +55,11 @@
         touch /var/lock/subsys/xend
         test -z "$XENSTORED_ROOTDIR" || export XENSTORED_ROOTDIR
         test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
+   test -z "$XENCONSOLED_LOG" || export XENCONSOLED_LOG
+   test -z "$XENCONSOLED_LOGDIR" || export XENCONSOLED_LOGDIR
+   test -z "$XENCONSOLED_TIMESTAMP" || export XENCONSOLED_TIMESTAMP
+   test -z "$XENCONSOLED_OVERFLOW" || export XENCONSOLED_OVERFLOW
+   test -z "$XENCONSOLED_PIDFILE" || export XENCONSOLED_PIDFILE
         [[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
         [[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export 
XENBACKENDD_DEBUG
         xend start
@@ -62,6 +67,9 @@
         ;;
    stop)
         xend stop
+       if [ -n "`pidof xenconsoled`" ]; then
+               kill -2 `pidof xenconsoled`
+       fi
         rm -f /var/lock/subsys/xend
         ;;
    status)

             reply	other threads:[~2010-10-22 19:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 19:47 ShaunR [this message]
2010-10-26 16:21 ` [PATCH] for xend init script and xend python script Ian Jackson
2010-10-26 17:38   ` ShaunR
2010-10-27 16:14     ` Ian Jackson
2010-10-29 17:57       ` Shaun Reitan
2010-10-29 18:02         ` Ian Jackson
2010-10-29 18:03           ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='i9spod$lfi$1@dough.gmane.org' \
    --to=mailinglists@unix-scripts.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.