From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Kirstein Subject: Re: xendomains init script Date: Wed, 28 Feb 2007 06:20:23 +0100 Message-ID: <20070228062023.D27835@web.ray.net> References: <20051019094439.GQ8705@tpkurt.tagung.uni-hamburg.de> <20060330060933.C26981@web.ray.net> <20060330212128.GQ14102@redhat.com> <20060331062717.D26981@web.ray.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Return-path: Content-Disposition: inline In-Reply-To: <20060331062717.D26981@web.ray.net>; from xenlist@custom.ray.net on Fri, Mar 31, 2006 at 06:27:17AM +0200 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen development list List-Id: xen-devel@lists.xenproject.org --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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() --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xendomains.patch" # 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 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() --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --gBBFr7Ir9EOA20Yy--