mcst-linux-kernel/patches-2024.06.26/freeipmi-1.4.5/0002-bug122966-init-functio...

106 lines
2.8 KiB
Diff
Raw Normal View History

2024-07-09 13:51:45 +03:00
diff -Naur a/etc/bmc-watchdog.init b/etc/bmc-watchdog.init
--- a/etc/bmc-watchdog.init 2020-04-06 18:33:49.536629209 +0300
+++ b/etc/bmc-watchdog.init 2020-04-10 17:08:13.316842884 +0300
@@ -25,8 +25,8 @@
fi
# Load Redhat or Suse appropriate libs
-if [ -f /etc/rc.d/init.d/functions ] ; then
- . /etc/rc.d/init.d/functions
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
Xstart() {
# Default deamon mode
@@ -38,19 +38,21 @@
# initial-countdown = 900 seconds (15 mins)
# reset-period = 60 seconds
- daemon -20 $DAEMON $OPTIONS
+ loadproc $DAEMON $OPTIONS
+ evaluate_retval
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
}
Xstop() {
- killproc bmc-watchdog
+ killproc $DAEMON
RETVAL=$?
+ evaluate_retval
echo
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
}
Xstatus() {
- status bmc-watchdog
+ statusproc $DAEMON
RETVAL=$?
return $RETVAL
}
diff -Naur a/etc/ipmidetectd.init b/etc/ipmidetectd.init
--- a/etc/ipmidetectd.init 2020-04-06 18:33:49.586616548 +0300
+++ b/etc/ipmidetectd.init 2020-04-10 17:11:57.840112007 +0300
@@ -22,22 +22,24 @@
[ -f $IPMIDETECTD_CONF ] || exit 6
# Load Redhat or Suse appropriate libs
-if [ -f /etc/rc.d/init.d/functions ] ; then
- . /etc/rc.d/init.d/functions
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
Xstart() {
- daemon $IPMIDETECTD
+ loadproc $IPMIDETECTD
RETVAL=$?
+ evaluate_retval
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
}
Xstop() {
- killproc ipmidetectd -TERM
+ killproc $IPMIDETECTD -TERM
RETVAL=$?
+ evaluate_retval
echo
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
}
Xstatus() {
- status ipmidetectd
+ statusproc $IPMIDETECTD
RETVAL=$?
return $RETVAL
}
diff -Naur a/etc/ipmiseld.init b/etc/ipmiseld.init
--- a/etc/ipmiseld.init 2020-04-06 18:33:49.616608951 +0300
+++ b/etc/ipmiseld.init 2020-04-10 17:15:41.663557996 +0300
@@ -22,22 +22,24 @@
[ -f $IPMISELD_CONF ] || exit 6
# Load Redhat or Suse appropriate libs
-if [ -f /etc/rc.d/init.d/functions ] ; then
- . /etc/rc.d/init.d/functions
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
Xstart() {
- daemon $IPMISELD
+ loadproc $IPMISELD
RETVAL=$?
+ evaluate_retval
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
}
Xstop() {
- killproc ipmiseld -TERM
+ killproc $IPMISELD -TERM
RETVAL=$?
+ evaluate_retval
echo
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
}
Xstatus() {
- status ipmiseld
+ statusproc $IPMISELD
RETVAL=$?
return $RETVAL
}