[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] [Patch] Fix exit status for bmc-watchdog on SuSE
From: |
Frank Steiner |
Subject: |
[Freeipmi-devel] [Patch] Fix exit status for bmc-watchdog on SuSE |
Date: |
Wed, 26 May 2010 13:09:28 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20100302) |
Hi,
the patch for adjusting the bmc-watchdog init script for SuSE systems
sent in
http://lists.gnu.org/archive/html/freeipmi-devel/2009-01/msg00012.html
doesn't work together with the "exit $RETVAL" added in
http://lists.gnu.org/archive/html/freeipmi-devel/2009-09/msg00008.html
because the exit status of the SuSE rc_ functions is not returned by
the init script itself. Currently, the script always returns "0" on
a SuSE system, not matter what fails.
The attached patch tries to fix this. Please reply cc to me, I'm not
subscribed.
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
2010-05-26 Frank Steiner (http://www.bio.ifi.lmu.de/~steiner/)
* bmc-watchdog/freeipmi-bmc-watchdog.init: exit status from
rc_ functions is not returned by init script.
--- bmc-watchdog.init.orig 2009-10-01 20:09:57.000000000 +0200
+++ bmc-watchdog.init 2010-05-26 12:50:57.000000000 +0200
@@ -7,6 +7,7 @@
# Provides: bmc-watchdog
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Start and stop bmc-watchdog
# Description: BMC watchdog timer daemon
@@ -68,15 +69,21 @@
Xstart() {
startproc -20 $DAEMON $OPTIONS
rc_status -v
+ RETVAL=$?
+ return $RETVAL
}
Xstop() {
killproc -TERM $DAEMON
rc_status -v
+ RETVAL=$?
+ return $RETVAL
}
Xstatus() {
echo -n "Checking for bmc-watchdog: "
checkproc $DAEMON
rc_status -v
+ RETVAL=$?
+ return $RETVAL
}
Xcondrestart() {
$0 status
@@ -86,6 +93,8 @@
rc_reset
fi
rc_status
+ RETVAL=$?
+ return $RETVAL
}
Xexit() {
rc_exit
- [Freeipmi-devel] [Patch] Fix exit status for bmc-watchdog on SuSE,
Frank Steiner <=