rpms/rbldnsd/devel rbldnsd.init,1.2,1.3 rbldnsd.spec,1.8,1.9

Paul Howarth (pghmcfc) fedora-extras-commits at redhat.com
Wed Feb 20 13:22:08 UTC 2008


Author: pghmcfc

Update of /cvs/pkgs/rpms/rbldnsd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30041

Modified Files:
	rbldnsd.init rbldnsd.spec 
Log Message:
fix exit codes for reload, stop, and try-restart actions of initscript


Index: rbldnsd.init
===================================================================
RCS file: /cvs/pkgs/rpms/rbldnsd/devel/rbldnsd.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rbldnsd.init	13 Feb 2008 18:39:17 -0000	1.2
+++ rbldnsd.init	20 Feb 2008 13:21:29 -0000	1.3
@@ -65,7 +65,7 @@
 			# Start/stop this daemon
 			$1
 			thisret=$?
-			if [ "$1" = "check_one_daemon" ]; then
+			if [ "$1" = "check_one_daemon" -o "$1" = "reload_one_daemon" ]; then
 				if [ $thisret -ne 0 ]; then
 					ret=$thisret
 				fi
@@ -98,8 +98,13 @@
 		kill $pid
 		usleep 500000
 		checkpid $pid
-		RETVAL=$?
-		[ "$RETVAL" = 1 ] && echo_success || echo_failure
+		if [ $? = 0 ]; then
+			echo_failure
+			RETVAL=1
+		else
+			echo_success
+			RETVAL=0
+		fi
 		echo
 		rm -f $pidfile
 	fi
@@ -114,6 +119,9 @@
 		checkpid $pid && echo_success || echo_failure
 		RETVAL=$?
 		echo
+	else
+		# Not running
+		return 7
 	fi
 }
 
@@ -143,8 +151,11 @@
 }
 
 condrestart_one_daemon() {
-	[ -e /var/lock/subsys/$prog ] && restart_one_daemon
-	return 0
+	if [ -e /var/lock/subsys/$prog ]; then
+		restart_one_daemon
+	else
+		return 0
+	fi
 }
 
 # See how we were called.


Index: rbldnsd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rbldnsd/devel/rbldnsd.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- rbldnsd.spec	13 Feb 2008 18:39:17 -0000	1.8
+++ rbldnsd.spec	20 Feb 2008 13:21:29 -0000	1.9
@@ -1,7 +1,7 @@
 Summary:	Small, fast daemon to serve DNSBLs
 Name:		rbldnsd
 Version:	0.996a
-Release:	5%{?dist}
+Release:	6%{?dist}
 License:	GPLv2+
 Group:		System Environment/Daemons
 URL:		http://www.corpit.ru/mjt/rbldnsd.html
@@ -70,6 +70,9 @@
 %{_initrddir}/rbldnsd
 
 %changelog
+* Wed Feb 20 2008 Paul Howarth <paul at city-fan.org> 0.996a-6
+- fix exit codes for reload, stop, and try-restart actions of initscript
+
 * Wed Feb 13 2008 Paul Howarth <paul at city-fan.org> 0.996a-5
 - define _GNU_SOURCE for NI_MAXHOST symbol visibility
 - LSB-ize initscript (#247043)




More information about the fedora-extras-commits mailing list