54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
523177: Initscript: ipmidetectd incorrect exit codes
|
|
523169: Initscript: ipmidetectd missing actions
|
|
|
|
Implement try-restart and force-reload actions.
|
|
Return correct exit codes.
|
|
|
|
diff -up freeipmi-0.7.12/ipmidetect/freeipmi-ipmidetectd.init.lsb freeipmi-0.7.12/ipmidetect/freeipmi-ipmidetectd.init
|
|
--- freeipmi-0.7.12/ipmidetect/freeipmi-ipmidetectd.init.lsb 2007-12-14 20:16:25.000000000 +0100
|
|
+++ freeipmi-0.7.12/ipmidetect/freeipmi-ipmidetectd.init 2009-09-14 15:38:12.000000000 +0200
|
|
@@ -14,6 +14,7 @@
|
|
### END INIT INFO
|
|
|
|
IPMIDETECTD=/usr/sbin/ipmidetectd
|
|
+IPMIDETECTD_CFG=/etc/ipmidetectd.cfg
|
|
|
|
[ -f $IPMIDETECTD ] || exit 1
|
|
|
|
@@ -21,6 +22,11 @@ IPMIDETECTD=/usr/sbin/ipmidetectd
|
|
if [ -f /etc/rc.d/init.d/functions ] ; then
|
|
. /etc/rc.d/init.d/functions
|
|
Xstart() {
|
|
+ if [ ! -f IPMIDETECTD_CFG ] ; then
|
|
+ failure; echo
|
|
+ RETVAL=6
|
|
+ return
|
|
+ fi
|
|
daemon $IPMIDETECTD
|
|
RETVAL=$?
|
|
echo
|
|
@@ -89,7 +95,7 @@ case "$1" in
|
|
echo -n "Shutting down ipmidetectd: "
|
|
Xstop
|
|
;;
|
|
- restart|reload)
|
|
+ restart|force-reload)
|
|
$0 stop
|
|
$0 start
|
|
RETVAL=$?
|
|
@@ -97,10 +103,11 @@ case "$1" in
|
|
status)
|
|
Xstatus
|
|
;;
|
|
- condrestart)
|
|
+ condrestart|try-restart)
|
|
Xcondrestart
|
|
;;
|
|
*)
|
|
- echo "Usage: $0 {start|stop|restart|status|condrestart}"
|
|
+ echo "Usage: $0 {start|stop|restart|status|condrestart|force-reload|try-restart}"
|
|
- exit 1
|
|
+ exit 2
|
|
esac
|
|
+exit $RETVAL
|