rpms/freeipmi/devel freeipmi-0.7.12-lsb.patch, NONE, 1.1 freeipmi.spec, 1.23, 1.24

Jan Šafránek jsafrane at fedoraproject.org
Mon Sep 14 13:44:49 UTC 2009


Author: jsafrane

Update of /cvs/pkgs/rpms/freeipmi/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16219

Modified Files:
	freeipmi.spec 
Added Files:
	freeipmi-0.7.12-lsb.patch 
Log Message:
Fix init scripts to be LSB compliant and return correct exit codes and provide mandatory actions
Resolves: #523169 #523177

freeipmi-0.7.12-lsb.patch:
 freeipmi-ipmidetectd.init |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--- NEW FILE freeipmi-0.7.12-lsb.patch ---
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
 esac
+exit $RETVAL


Index: freeipmi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/freeipmi/devel/freeipmi.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- freeipmi.spec	9 Sep 2009 07:01:05 -0000	1.23
+++ freeipmi.spec	14 Sep 2009 13:44:49 -0000	1.24
@@ -2,7 +2,7 @@
 # Copyright (c) 2003 FreeIPMI Core Team
 #
 
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 Name: freeipmi
 Version: 0.7.12
@@ -14,6 +14,7 @@ Patch1: freeipmi-0.5.1-regex.patch
 Patch2: freeipmi-0.6.4-silent.patch
 Patch3: freeipmi-0.6.4-argmax.patch
 Patch4: freeipmi-0.6.4-pathsep.patch
+Patch5: freeipmi-0.7.12-lsb.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: libgcrypt-devel texinfo
 Requires(pre): chkconfig
@@ -68,6 +69,7 @@ Provides a tool and a daemon for IPMI no
 %patch2 -p1 -b .silent
 %patch3 -p1 -b .argmax
 %patch4 -p1 -b .pathsep
+%patch5 -p1 -b .lsb
 
 %build
 export CFLAGS="-D_GNU_SOURCE $RPM_OPT_FLAGS"
@@ -291,7 +293,11 @@ fi
 %{_mandir}/man8/ipmidetectd.8*
 
 %changelog
-* Wed Sep  9 2009 Jan Safranek <jsafrane at redhat.com> - 0.7.12
+* Mon Sep 14 2009 Jan Safranek <jsafrane at redhat.com> - 0.7.12-2
+- Fix init scripts to be LSB compliant and return correct exit codes
+  and provide mandatory actions (#523169, #523177)
+
+* Wed Sep  9 2009 Jan Safranek <jsafrane at redhat.com> - 0.7.12-2
 - Update to freeipmi-0.7.12
 
 * Thu Aug  6 2009 Jan Safranek <jsafrane at redhat.com> - 0.7.11-2




More information about the fedora-extras-commits mailing list