rpms/dcbd/devel dcbd-0.9.19-init-lsb.patch, NONE, 1.1 dcbd.spec, 1.8, 1.9

Jan Zeleny jzeleny at fedoraproject.org
Fri Nov 13 08:18:23 UTC 2009


Author: jzeleny

Update of /cvs/extras/rpms/dcbd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28180

Modified Files:
	dcbd.spec 
Added Files:
	dcbd-0.9.19-init-lsb.patch 
Log Message:
init script patch adding LSB compliance

dcbd-0.9.19-init-lsb.patch:
 dcbd.init |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- NEW FILE dcbd-0.9.19-init-lsb.patch ---
--- dcbd.init.orig	2009-11-12 08:54:11.000000000 +0100
+++ dcbd.init	2009-11-13 09:13:34.000000000 +0100
@@ -151,6 +151,7 @@
 # See how we were called.
 case "$1" in
 	start)
+		[ "$EUID" = "0" ] || exit 4
 		if ! /sbin/lsmod | grep dcbnl > /dev/null; then
 			mod_dir="/lib/modules/$(uname -r)/kernel/net/dcb"
 			if [ -f $mod_dir/dcbnl.ko ]; then
@@ -163,6 +164,7 @@
 		[ $? -eq 0 ] && touch /var/lock/subsys/dcbd
 		;;
 	stop)
+		[ "$EUID" = "0" ] || exit 4
 		echo -n $"Shutting down $DCBD: "
 		killproc $DCBD
 		rc_status -v
@@ -185,6 +187,9 @@
 		checkproc $DCBD_BIN
 		# NOTE: rc_status knows that we called this init script with
 		# "status" option and adapts its messages accordingly.
+		if [ "$?" = "3" -a -f /var/lock/subsys/dcbd ]; then
+			rc_failed 2
+		fi
 		rc_status -v
 		;;
 	try-restart|condrestart)
@@ -242,9 +247,13 @@
 		rc_failed 3
 		rc_status -v
 		;;
+	usage)
+       		echo $"Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+		exit 0
+		;;
 	*)
        		echo $"Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
-		exit 1
+		exit 2
 esac
 
 rc_exit


Index: dcbd.spec
===================================================================
RCS file: /cvs/extras/rpms/dcbd/devel/dcbd.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- dcbd.spec	8 Oct 2009 08:33:34 -0000	1.8
+++ dcbd.spec	13 Nov 2009 08:18:22 -0000	1.9
@@ -1,6 +1,6 @@
 Name:           dcbd
 Version:        0.9.19
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Intel EEDC Connection
 
 Group:          System Environment/Daemons
@@ -11,6 +11,7 @@ Patch0:         dcbd-0.9.7-make.patch
 Patch1:         dcbd-0.9.15-sysconfig.patch
 Patch2:         dcbd-0.9.7-init.patch
 Patch3:         dcbd-0.9.15-lookup-string.patch
+Patch4:			dcbd-0.9.19-init-lsb.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires: kernel >= 2.6.31
@@ -38,6 +39,7 @@ that use %{name}.
 %patch1 -p1 -b .sysconfig
 %patch2 -p1 -b .init
 %patch3 -p1 -b .lookup-string
+%patch4 -p1 -b .init-lsb
 
 
 %build
@@ -92,6 +94,9 @@ fi
 
 
 %changelog
+* Fri Nov 13 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.19-2
+- init script patch adding LSB compliance
+
 * Thu Oct 08 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.19-1
 - update to new upstream version
 




More information about the scm-commits mailing list