|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] xendomains init script
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@xxxxxxxxxxxxx
# 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@xxxxxxx>
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()
xendomains.patch
Description: Text document
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] xendomains init script,
Florian Kirstein <=
|
|
|
|
|