rpms/rbldnsd/devel rbldnsd.init,1.1,1.2 rbldnsd.spec,1.7,1.8

Paul Howarth (pghmcfc) fedora-extras-commits at redhat.com
Wed Feb 13 18:39:58 UTC 2008


Author: pghmcfc

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

Modified Files:
	rbldnsd.init rbldnsd.spec 
Log Message:
- define _GNU_SOURCE for NI_MAXHOST symbol visibility
- LSB-ize initscript (#247043)



Index: rbldnsd.init
===================================================================
RCS file: /cvs/pkgs/rpms/rbldnsd/devel/rbldnsd.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rbldnsd.init	29 Jun 2005 06:14:33 -0000	1.1
+++ rbldnsd.init	13 Feb 2008 18:39:17 -0000	1.2
@@ -11,6 +11,14 @@
 # config: /etc/sysconfig/rbldnsd
 # pidfile: /var/run/rbldnsd*.pid
 
+### BEGIN INIT INFO
+# Provides: rbldnsd
+# Required-Start: $local_fs $network $syslog
+# Required-Stop: $local_fs $network $syslog
+# Short-Description: Start or stop DNS daemon for DNSBLs
+# Description: rbldnsd is a DNS daemon for DNSBLs
+### END INIT INFO
+
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
 prog=rbldnsd
 DAEMON=/usr/sbin/$prog
@@ -22,15 +30,20 @@
 [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
 [ -f /etc/sysconfig/rbldnsd ] && . /etc/sysconfig/rbldnsd
 
-# Check that networking is up and the rbldnsd binary is available
-[ "${NETWORKING}" = "yes" ] || exit 0
-[ -f $DAEMON ] || exit 1
+# Check that the rbldnsd binary is available
+[ -f $DAEMON ] || exit 5
 
 # Check that configuration has been set up (RBLDNSD set in /etc/sysconfig/rbldnsd)
-[ -n "$RBLDNSD" ] || exit 1
+[ -n "$RBLDNSD" ] || exit 6
+
+# Set an exit status
+set_status() {
+	exit $1
+}
 
 # Process multiple instances of the daemon (see /etc/sysconfig/rbldnsd)
 for_all_daemons() {
+	ret=0
 	echo "$RBLDNSD" |
 		while read name args; do
 			# generate pidfile name from key
@@ -51,6 +64,17 @@
 			fi
 			# Start/stop this daemon
 			$1
+			thisret=$?
+			if [ "$1" = "check_one_daemon" ]; then
+				if [ $thisret -ne 0 ]; then
+					ret=$thisret
+				fi
+			else
+				if [ $thisret -ne 0 ]; then
+					ret=1
+				fi
+			fi
+			set_status $ret
 		done
 }
 
@@ -127,27 +151,33 @@
 case "$1" in
 	start)
 		for_all_daemons start_one_daemon
-		touch /var/lock/subsys/$prog
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
 		;;
 	restart)
 		for_all_daemons restart_one_daemon
-		touch /var/lock/subsys/$prog
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
 		;;
-	reload)
+	force-reload|reload)
 		for_all_daemons reload_one_daemon
+		RETVAL=$?
 		;;
 	stop)
 		for_all_daemons stop_one_daemon
+		RETVAL=$?
 		rm -f /var/lock/subsys/$prog
 		;;
 	status)
 		for_all_daemons check_one_daemon
+		RETVAL=$?
 		;;
-	condrestart)
+	condrestart|try-restart)
 		for_all_daemons condrestart_one_daemon
+		RETVAL=$?
 		;;
 	*)
-		echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" >&2
+		echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" >&2
 		RETVAL=1
 		;;
 esac


Index: rbldnsd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rbldnsd/devel/rbldnsd.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- rbldnsd.spec	23 Aug 2007 17:18:15 -0000	1.7
+++ rbldnsd.spec	13 Feb 2008 18:39:17 -0000	1.8
@@ -1,7 +1,7 @@
 Summary:	Small, fast daemon to serve DNSBLs
 Name:		rbldnsd
 Version:	0.996a
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPLv2+
 Group:		System Environment/Daemons
 URL:		http://www.corpit.ru/mjt/rbldnsd.html
@@ -26,7 +26,7 @@
 
 %build
 # this is not an autotools-generated configure script, and does not support --libdir
-CFLAGS="%{optflags}" ./configure
+CFLAGS="-D_GNU_SOURCE %{optflags}" ./configure
 %{__make}
 
 %install
@@ -70,6 +70,10 @@
 %{_initrddir}/rbldnsd
 
 %changelog
+* 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)
+
 * Thu Aug 23 2007 Paul Howarth <paul at city-fan.org> 0.996a-4
 - add buildreq gawk
 




More information about the fedora-extras-commits mailing list