rpms/nsd/EL-5 nsd.cron, 1.2, 1.3 nsd.spec, 1.26, 1.27 nsd.sysconfig, 1.3, 1.4

Paul Wouters pwouters at fedoraproject.org
Mon Sep 14 15:03:27 UTC 2009


Author: pwouters

Update of /cvs/extras/rpms/nsd/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14233

Modified Files:
	nsd.cron nsd.spec nsd.sysconfig 
Log Message:
* Mon Sep 14 2009 Paul Wouters <paul at xelerance.com> - 3.2.3-3
- Fix for another redirection error in nsd.cron (Ville Mattila)
- Add support for NSD_AUTOREBUILD disabling via /etc/sysconfig/nsd (Ville Mattila)
- Fix for checking rebuild with large amount of zones (Ville Mattila)



Index: nsd.cron
===================================================================
RCS file: /cvs/extras/rpms/nsd/EL-5/nsd.cron,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- nsd.cron	4 Jun 2009 18:19:32 -0000	1.2
+++ nsd.cron	14 Sep 2009 15:03:26 -0000	1.3
@@ -5,8 +5,17 @@
 # in the ixfr.db and nsd.db files back into the zone files or visa
 # versa
 
+# Default settings - do not edit these but /etc/sysconfig/nsd instead!
+NSD_CONF="/etc/nsd/nsd.conf"
+NSDC_PROG="/usr/sbin/nsdc"
+NSD_CHECKCONF_PROG="/usr/sbin/nsd-checkconf"
+NSD_AUTOREBUILD="yes"
+
+# Read in local settings.
+[ -r /etc/sysconfig/nsd ] && . /etc/sysconfig/nsd
+
 # Ideally check if ixfr.db newer then any zones, only then do
-/usr/sbin/nsdc patch > /dev/null 2>&1
+$NSDC_PROG patch > /dev/null 2>&1
 
 # We try to only rebuild/reload when neccessary. If 1 zone is newer,
 # we need to rebuild the db file.
@@ -14,19 +23,25 @@
 # complete this operation within an hour, but it should work fine for
 # most other uses.
 
-for zonefile in `/usr/sbin/nsd-checkconf -v /etc/nsd/nsd.conf  |grep zonefile: | sed "s/^.*\"\(.*\)\"/\1/"`
-do
-	if [ $zonefile -nt /var/lib/nsd/nsd.db ]
-	then
-		echo "Zone $zonefile update requires nsd.db rebuild"
-		/usr/sbin/nsdc rebuild > /dev/null 2>%1
-		/usr/sbin/nsdc reload > /dev/null 2>%1
-		break
-	fi
-done
-
+case "$NSD_AUTOREBUILD" in
+	[Yy]|[Yy][Ee][Ss])
+		database="`$NSD_CHECKCONF_PROG -o database $NSD_CONF`"
+		$NSD_CHECKCONF_PROG -v $NSD_CONF | grep zonefile: | sed "s/^.*\"\(.*\)\"/\1/" | while read zonefile
+		do
+			if [ $zonefile -nt $database ]
+			then
+				echo "Zone $zonefile update requires database rebuild"
+				$NSDC_PROG rebuild > /dev/null 2>&1
+				$NSDC_PROG reload > /dev/null 2>&1
+				break
+			fi
+		done
+		;;
+	*)
+		;;	
+esac
 
 # nsd checks the serial in notify requests, so its better to send an
 # occasional redundant notify, then to miss it.
 # According to the nsd team, this is no longer neccessary
-# /usr/sbin/nsdc notify > /dev/null 2>%1
+# $NSDC_PROG notify > /dev/null 2>&1


Index: nsd.spec
===================================================================
RCS file: /cvs/extras/rpms/nsd/EL-5/nsd.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- nsd.spec	17 Aug 2009 22:08:44 -0000	1.26
+++ nsd.spec	14 Sep 2009 15:03:26 -0000	1.27
@@ -1,7 +1,7 @@
 Summary: Fast and lean authoritative DNS Name Server
 Name: nsd
 Version: 3.2.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
@@ -97,6 +97,11 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Mon Sep 14 2009 Paul Wouters <paul at xelerance.com> - 3.2.3-3
+- Fix for another redirection error in nsd.cron (Ville Mattila)
+- Add support for NSD_AUTOREBUILD disabling via /etc/sysconfig/nsd (Ville Mattila)
+- Fix for checking rebuild with large amount of zones (Ville Mattila)
+
 * Mon Aug 17 2009 Paul Wouters <paul at xelerance.com> - 3.2.3-2
 - Updated to 3.2.3
 


Index: nsd.sysconfig
===================================================================
RCS file: /cvs/extras/rpms/nsd/EL-5/nsd.sysconfig,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- nsd.sysconfig	4 Jun 2009 20:59:34 -0000	1.3
+++ nsd.sysconfig	14 Sep 2009 15:03:26 -0000	1.4
@@ -20,6 +20,9 @@ OTHER_NSD_OPTS=""
 # Path to nsd program
 #NSD_PROG="/usr/sbin/nsd"
 
+# Path to nsd-checkconf program
+#NSD_CHECKCONF_PROG="/usr/sbin/nsd-checkconf"
+
 # NSD pid file
 #NSD_PIDFILE="/var/run/nsd/nsd.pid"
 
@@ -27,4 +30,9 @@ OTHER_NSD_OPTS=""
 # parameter set in nsd.conf)
 #NSD_XFRDFILE="/var/lib/nsd/xfrd.state"
 
+# NSD_AUTOREBUILD:  Choose with "yes" or "no" whether NSD database should
+# be rebuilt and reloaded automatically hourly by /etc/cron.hourly/nsd script.
+# (Default value is set in the script.)
+#NSD_AUTOREBUILD="no"
+
 # EOF




More information about the fedora-extras-commits mailing list