[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] [PATCH 4/9] Don't start running service
From: |
Jan Safranek |
Subject: |
[Freeipmi-devel] [PATCH 4/9] Don't start running service |
Date: |
Wed, 23 Sep 2009 12:46:20 +0200 |
User-agent: |
StGIT/0.14.3 |
LSB specifies that 'start' operation on already running service should
return exit code 0 and do nothing.
I am not sure how the code path with /etc/rc.status instead of
/etc/init.d/functions works, does rc_status -v set RETVAL and returns the same
exit code?
Signed-off-by: Jan Safranek <address@hidden>
---
bmc-watchdog/freeipmi-bmc-watchdog.init | 2 ++
ipmidetect/freeipmi-ipmidetectd.init | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init
b/bmc-watchdog/freeipmi-bmc-watchdog.init
index 0d07a11..d161931 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -51,6 +51,7 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
Xstatus() {
status bmc-watchdog
RETVAL=$?
+ return $RETVAL
}
Xcondrestart() {
if test -e $LOCKFILE; then
@@ -99,6 +100,7 @@ RETVAL=0
case "$1" in
start)
echo -n "Starting bmc-watchdog: "
+ Xstatus >/dev/null 2>&1 && exit 0
Xstart
;;
diff --git a/ipmidetect/freeipmi-ipmidetectd.init
b/ipmidetect/freeipmi-ipmidetectd.init
index cb2325d..101fe58 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -37,6 +37,7 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
Xstatus() {
status ipmidetectd
RETVAL=$?
+ return $RETVAL
}
Xcondrestart() {
if test -e /var/lock/subsys/freeipmi-ipmidetectd; then
@@ -85,6 +86,7 @@ RETVAL=0
case "$1" in
start)
echo -n "Starting ipmidetectd: "
+ Xstatus >/dev/null 2>&1 && exit 0
Xstart
;;
stop)
- [Freeipmi-devel] [PATCH 0/9] Unsorted init script tuning, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 1/9] Initscript should return '5' when 'program is not installed', Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 2/9] Return '6' if there is no config file, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 3/9] Add sample configuration file for ipmidetectd, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 4/9] Don't start running service,
Jan Safranek <=
- [Freeipmi-devel] [PATCH 5/9] Reload operation is not supported by the daemons, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 6/9] Add missing actions, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 7/9] Return proper exit code, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 8/9] Rename lockfiles, Jan Safranek, 2009/09/23
- [Freeipmi-devel] [PATCH 9/9] Remove freeipmi- prefix from initscript, Jan Safranek, 2009/09/23
- Re: [Freeipmi-devel] [PATCH 0/9] Unsorted init script tuning, Al Chu, 2009/09/23