All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Kirstein <xenlist@custom.ray.net>
To: Xen development list <xen-devel@lists.xensource.com>
Subject: Re: xendomains init script
Date: Wed, 28 Feb 2007 06:20:23 +0100	[thread overview]
Message-ID: <20070228062023.D27835@web.ray.net> (raw)
In-Reply-To: <20060331062717.D26981@web.ray.net>; from xenlist@custom.ray.net on Fri, Mar 31, 2006 at 06:27:17AM +0200

[-- Attachment #1: Type: text/plain, Size: 2207 bytes --]

Hi,

replying to my almost a year old message:
> The patch works for xen 3.0.1 (and newer, possibly some older)
... I've finally build this as patch for current xen-unstable.hg.
RedHat followed the suggestion to reimplement LSB compatibility in
RHEL5, but for all the others (including FC6) this patch still is
needed. It's also referenced as solution in 
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171056
and I'm using it since I first posted it on all my xen builds, don't
see problems there, should not harm non-redhat dists.

(:ul8er, r@y

# HG changeset patch
# User ray@build.ray.net
# Node ID a96bf6276e4fa1323a0ffe260f0029018b57dfda
# Parent  1c5e6239a8d0381fdbf56d4926f986d7f0ec07c0
Fix init.d/xendomains startup script so log_error and log_success
will also work on redhat-based distributions before RHEL 5. See
discussion "xendomains init script" about a year ago on xen-devel.

Signed-off-by: Florian Kirstein <ray@ray.net>

diff -r 1c5e6239a8d0 -r a96bf6276e4f tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains	Sun Feb 25 23:58:33 2007 -0600
+++ b/tools/examples/init.d/xendomains	Wed Feb 28 06:08:20 2007 +0100
@@ -58,18 +58,7 @@ else
 	_SMSG=(done failed failed missed failed skipped unused failed failed)
 	_RC_UNUSED=6
     fi
-    if test -e /lib/lsb/init-functions; then
-	# LSB    
-    	. /lib/lsb/init-functions
-	echo_rc()
-	{
-	    if test ${_RC_RV} = 0; then
-		log_success_msg "  [${_SMSG[${_RC_RV}]}] "
-	    else
-		log_failure_msg "  [${_SMSG[${_RC_RV}]}] "
-	    fi
-	}
-    elif test -e /etc/init.d/functions; then
+    if test -e /etc/init.d/functions; then
 	# REDHAT
 	. /etc/init.d/functions
 	echo_rc()
@@ -81,6 +70,24 @@ else
 		failure "  [${_SMSG[${_RC_RV}]}] "
 	    fi
 	}
+    elif test -e /lib/lsb/init-functions; then
+	# LSB    
+    	. /lib/lsb/init-functions
+        if alias log_success_msg >/dev/null 2>/dev/null; then
+	  echo_rc()
+	  {
+	       echo "  [${_SMSG[${_RC_RV}]}] "
+	  }
+        else
+	  echo_rc()
+	  {
+	    if test ${_RC_RV} = 0; then
+		log_success_msg "  [${_SMSG[${_RC_RV}]}] "
+	    else
+		log_failure_msg "  [${_SMSG[${_RC_RV}]}] "
+	    fi
+	  }
+        fi
     else    
 	# emulate it
 	echo_rc()

[-- Attachment #2: xendomains.patch --]
[-- Type: text/plain, Size: 1653 bytes --]

# HG changeset patch
# User ray@build.ray.net
# Node ID a96bf6276e4fa1323a0ffe260f0029018b57dfda
# Parent  1c5e6239a8d0381fdbf56d4926f986d7f0ec07c0
Fix init.d/xendomains startup script so log_error and log_success
will also work on redhat-based distributions before RHEL 5. See
discussion "xendomains init script" about a year ago on xen-devel.

Signed-off-by: Florian Kirstein <ray@ray.net>

diff -r 1c5e6239a8d0 -r a96bf6276e4f tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains	Sun Feb 25 23:58:33 2007 -0600
+++ b/tools/examples/init.d/xendomains	Wed Feb 28 06:08:20 2007 +0100
@@ -58,18 +58,7 @@ else
 	_SMSG=(done failed failed missed failed skipped unused failed failed)
 	_RC_UNUSED=6
     fi
-    if test -e /lib/lsb/init-functions; then
-	# LSB    
-    	. /lib/lsb/init-functions
-	echo_rc()
-	{
-	    if test ${_RC_RV} = 0; then
-		log_success_msg "  [${_SMSG[${_RC_RV}]}] "
-	    else
-		log_failure_msg "  [${_SMSG[${_RC_RV}]}] "
-	    fi
-	}
-    elif test -e /etc/init.d/functions; then
+    if test -e /etc/init.d/functions; then
 	# REDHAT
 	. /etc/init.d/functions
 	echo_rc()
@@ -81,6 +70,24 @@ else
 		failure "  [${_SMSG[${_RC_RV}]}] "
 	    fi
 	}
+    elif test -e /lib/lsb/init-functions; then
+	# LSB    
+    	. /lib/lsb/init-functions
+        if alias log_success_msg >/dev/null 2>/dev/null; then
+	  echo_rc()
+	  {
+	       echo "  [${_SMSG[${_RC_RV}]}] "
+	  }
+        else
+	  echo_rc()
+	  {
+	    if test ${_RC_RV} = 0; then
+		log_success_msg "  [${_SMSG[${_RC_RV}]}] "
+	    else
+		log_failure_msg "  [${_SMSG[${_RC_RV}]}] "
+	    fi
+	  }
+        fi
     else    
 	# emulate it
 	echo_rc()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2007-02-28  5:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-19  9:44 xendomains init script Kurt Garloff
2005-10-26 17:11 ` Ewan Mellor
2005-10-26 17:27   ` Kurt Garloff
2006-03-30  3:57 ` Florian Kirstein
2006-03-30  4:09 ` Florian Kirstein
2006-03-30 21:21   ` Daniel Veillard
2006-03-31  4:27     ` Florian Kirstein
2007-02-28  5:20       ` Florian Kirstein [this message]
2007-02-28 14:51         ` Keir Fraser
2007-02-28 17:26           ` Florian Kirstein
  -- strict thread matches above, loose matches on Subject: below --
2005-10-26 19:05 Ian Pratt
2005-10-26 23:35 ` Chris Bainbridge
2005-10-27 14:15 Ian Pratt
2005-10-27 15:16 ` Chris Bainbridge

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=20070228062023.D27835@web.ray.net \
    --to=xenlist@custom.ray.net \
    --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.