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-changelog

[Xen-changelog] [xen-unstable] Fix init.d/xendomains startup script so l

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix init.d/xendomains startup script so log_error and log_success
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Feb 2007 18:30:14 -0800
Delivery-date: Wed, 28 Feb 2007 18:29:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172686016 0
# Node ID d2646466e0a7352ebc11f3277d51d99f737d0fd3
# Parent  c3c03089c59ef515766636dd4afef6573f3b6b42
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@xxxxxxx>
---
 tools/examples/init.d/xendomains |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff -r c3c03089c59e -r d2646466e0a7 tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains  Wed Feb 28 17:55:19 2007 +0000
+++ b/tools/examples/init.d/xendomains  Wed Feb 28 18:06:56 2007 +0000
@@ -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()

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix init.d/xendomains startup script so log_error and log_success, Xen patchbot-unstable <=