rpms/nsd/devel nsd.cron, 1.7, 1.8 nsd.spec, 1.58, 1.59 nsd.sysconfig, 1.3, 1.4 sources, 1.24, 1.25

Paul Wouters pwouters at fedoraproject.org
Tue Jan 5 21:49:04 UTC 2010


Author: pwouters

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

Modified Files:
	nsd.cron nsd.spec nsd.sysconfig sources 
Log Message:
* Tue Jan 05 2010 Paul Wouters <paul at xelerance.com> - 3.2.3-4
- Incorporated Ville Mattila's fixes  to nsd.cron
- Support for NSD_AUTOREBUILD in /etc/sysconfig/nsd [Ville]



Index: nsd.cron
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.cron,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- nsd.cron	29 Jul 2009 16:31:38 -0000	1.7
+++ nsd.cron	5 Jan 2010 21:49:03 -0000	1.8
@@ -4,8 +4,17 @@
 # This folds back zone updates, dynamic updates, etc that nsd records
 # in the ixfr.db and nsd.db files back into the zone files or vice-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_AUTORELOAD="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 -c $NSD_CONF 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.
@@ -13,19 +22,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_AUTORELOAD" 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/devel/nsd.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -p -r1.58 -r1.59
--- nsd.spec	21 Aug 2009 14:43:54 -0000	1.58
+++ nsd.spec	5 Jan 2010 21:49:03 -0000	1.59
@@ -1,7 +1,7 @@
 Summary: Fast and lean authoritative DNS Name Server
 Name: nsd
 Version: 3.2.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
@@ -97,6 +97,10 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Tue Jan 05 2010 Paul Wouters <paul at xelerance.com> - 3.2.3-4
+- Incorporated Ville Mattila's fixes  to nsd.cron
+- Support for NSD_AUTOREBUILD in /etc/sysconfig/nsd [Ville]
+
 * Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 3.2.3-3
 - rebuilt with new openssl
 


Index: nsd.sysconfig
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/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:36 -0000	1.3
+++ nsd.sysconfig	5 Jan 2010 21:49:03 -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


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/sources,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- sources	17 Aug 2009 14:38:53 -0000	1.24
+++ sources	5 Jan 2010 21:49:03 -0000	1.25
@@ -1,2 +1 @@
-a0dcb0a3b3c1a8d386125eeafe403f58  nsd-3.2.2.tar.gz
 5ddb35dfb7da0defb82cda4f7388cba2  nsd-3.2.3.tar.gz




More information about the fedora-extras-commits mailing list