rpms/nsd/devel nsd.cron, NONE, 1.1 nsd.init, 1.7, 1.8 nsd.spec, 1.25, 1.26

Paul Wouters (pwouters) fedora-extras-commits at redhat.com
Thu Nov 8 16:21:52 UTC 2007


Author: pwouters

Update of /cvs/extras/rpms/nsd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7218

Modified Files:
	nsd.init nsd.spec 
Added Files:
	nsd.cron 
Log Message:
* Wed Nov  7 2007 Paul Wouters <paul at xelerance.com> - 3.0.6-6
- Added hourly cron job to do various maintenance tasks
- Added nsd rebuild to create the proper nsd.db file on startup
- Added nsd patch on shutdown to ensure zonefiles are up to date




--- NEW FILE nsd.cron ---
#!/bin/sh

# this folds back zone updates, dynamic updates, etc back into the
# zone files.

# note that for very large zones (eg TLD's) you do not want to do this
# every hour. But for hosting a lot of small zones, it is useful.

/usr/sbin/nsdc update > /dev/nul 2>%1
/usr/sbin/nsdc patch > /dev/nul 2>%1
/usr/sbin/nsdc rebuild > /dev/nul 2>%1
/usr/sbin/nsdc reload > /dev/nul 2>%1

# nsd checks the serial in notify requests, so its better to send an
# occasional redundant notify, then to miss it
/usr/sbin/nsdc notify > /dev/nul 2>%1


Index: nsd.init
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.init,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- nsd.init	2 Oct 2007 19:42:25 -0000	1.7
+++ nsd.init	8 Nov 2007 16:21:14 -0000	1.8
@@ -34,8 +34,8 @@
 [ ${NETWORKING} = "no" ] && exit 0
 
 start() {
-	/usr/sbin/nsdc rebuild >/dev/null
 	echo -n $"Starting nsd... "
+	/usr/sbin/nsdc rebuild >/dev/null 2>%1
 	nsd $OTHER_NSD_OPTS
 	RETVAL=$?
 	echo
@@ -45,6 +45,8 @@
 
 stop() {
 	echo -n $"Shutting down nsd services: "
+	# save state to zonefiles
+	/usr/sbin/nsdc patch > /dev/null 2>%1
 	killproc nsd
 	RETVAL=$?
 	if [ $RETVAL -eq 0 ] ; then


Index: nsd.spec
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- nsd.spec	2 Oct 2007 20:02:28 -0000	1.25
+++ nsd.spec	8 Nov 2007 16:21:14 -0000	1.26
@@ -1,11 +1,12 @@
 Summary: NSD is a complete implementation of an authoritative DNS name server
 Name: nsd
 Version: 3.0.6
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: BSD-like
 Url: http://open.nlnetlabs.nl/nsd/
 Source: http://open.nlnetlabs.nl/downloads/nsd/%{name}-%{version}.tar.gz
 Source1: nsd.init
+Source2: nsd.cron
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: flex, openssl-devel
@@ -32,6 +33,8 @@
 rm -rf %{buildroot}
 %{__make} DESTDIR=%{buildroot} install
 install -d -m 0755 %{buildroot}%{_initrddir}
+install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
+install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/nsd
 install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
 install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
 install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
@@ -52,6 +55,7 @@
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
 #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
 %attr(0755,root,root) %{_initrddir}/%{name}
+%{_sysconfdir}/cron.hourly/nsd
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
 %{_sbindir}/*
@@ -77,6 +81,11 @@
 fi
 
 %changelog
+* Wed Nov  7 2007 Paul Wouters <paul at xelerance.com> - 3.0.6-6
+- Added hourly cron job to do various maintenance tasks
+- Added nsd rebuild to create the proper nsd.db file on startup
+- Added nsd patch on shutdown to ensure zonefiles are up to date
+
 * Tue Oct  2 2007 Paul Wouters <paul at xelerance.com> - 3.0.6-5
 - nsdc update and nsdc notify are no longer needed in initscript.
 




More information about the fedora-extras-commits mailing list