rpms/nsd/F-10 nsd.sysconfig, NONE, 1.1 nsd.init, 1.8, 1.9 nsd.spec, 1.38, 1.39 sources, 1.18, 1.19

Paul Wouters pwouters at fedoraproject.org
Fri Apr 10 18:05:34 UTC 2009


Author: pwouters

Update of /cvs/extras/rpms/nsd/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12914/F-10

Modified Files:
	nsd.init nsd.spec sources 
Added Files:
	nsd.sysconfig 
Log Message:
Moved all supported nsd versions to yse a sysconfig file and fixed
various small issues in the cron and init scripts. Also upgraded all
to latest nsd (3.2.1)



--- NEW FILE nsd.sysconfig ---
# /etc/sysconfig/nsd
# Configuration for /etc/init.d/nsd

OTHER_NSD_OPTS=""
#extra verbosity
#ZONEC_VERBOSE=-v

# You might also need to change SElinux policies if you decide
# to deviate from the standard locations below.

# Main configuration file
#NSD_CONF="/etc/nsd/nsd.conf"

# Path to nsdc program
#NSDC_PROG="/usr/sbin/nsd"

# Path to nsd program
#NSD_PROG="/usr/sbin/nsd"

# NSD pid file
#NSD_PIDFILE="/var/run/nsd/nsd.pid"

# NSD zone transfer daemon state file (should equal to the xfrdfile
# parameter set in nsd.conf)
#NSD_XFRDFILE="/var/lib/nsd/xfrd.state"

# EOF


Index: nsd.init
===================================================================
RCS file: /cvs/extras/rpms/nsd/F-10/nsd.init,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nsd.init	8 Nov 2007 16:21:14 -0000	1.8
+++ nsd.init	10 Apr 2009 18:05:03 -0000	1.9
@@ -10,58 +10,74 @@
 #
 ### BEGIN INIT INFO
 # Provides: nsd
-# Required-Start: $syslog
+# Required-Start: $local_fs $network $syslog
+# Required-Stop: $local_fs $network $syslog
 # Default-Stop: 0 11 89
 # Short-Description: Starts the NSD Name Server Daemon
 # Description:  NSD is a complete implementation of an authoritative \
 #               DNS name server.
 ### END INIT INFO
 
-# Sanity checks.
-[ -f /etc/nsd/nsd.conf ] || exit 0
-[ -x /usr/sbin/nsd ] || exit 0
-
-#extra verbosity
-#ZONEC_VERBOSE=-v
-OTHER_NSD_OPTS=""
+# Init script default settings
+NSD_CONF="/etc/nsd/nsd.conf"
+NSD_PROG="/usr/sbin/nsd"
+NSD_PIDFILE="/var/run/nsd/nsd.pid"
+NSD_XFRDFILE="/var/lib/nsd/xfrd.state"
+NSDC_PROG="/usr/sbin/nsdc"
 
 # Source function library.
 . /etc/init.d/functions
 
-. /etc/sysconfig/network
+[ -r /etc/sysconfig/nsd ] && . /etc/sysconfig/nsd
 
 # Check that networking is configured.
 [ ${NETWORKING} = "no" ] && exit 0
 
 start() {
-	echo -n $"Starting nsd... "
-	/usr/sbin/nsdc rebuild >/dev/null 2>%1
-	nsd $OTHER_NSD_OPTS
-	RETVAL=$?
-	echo
-	touch /var/lock/subsys/nsd
-	return $RETVAL
+  # Source networking configuration.
+  [ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
+
+  # Check that networking is up
+  [ "${NETWORKING}" = "no" ] && exit 1
+
+  # Sanity checks.
+  [ -f $NSD_CONF ] || exit 5
+  [ -x $NSD_PROG ] || exit 5
+
+  echo -n $"Starting nsd... "
+  $NSDC_PROG -c $NSD_CONF rebuild >/dev/null 2>%1
+  $NSD_PROG -c $NSD_CONF $OTHER_NSD_OPTS
+  RETVAL=$?
+  echo
+  if [ $RETVAL -eq 0 ]; then
+     touch /var/lock/subsys/nsd
+  else
+    exit 7;
+  fi
+  return 0;
 }
 
 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
-	  rm -f /var/run/nsd/nsd.pid
-	  # ensure notifies are sent at startup
-	  rm -f /var/lib/nsd/xfrd.state
-	  rm -f /var/lock/subsys/nsd
-	fi
-	echo
-	return $RETVAL
+  echo -n $"Shutting down nsd services: "
+  # save state to zonefiles
+  $NSDC_PROG -c $NSD_CONF patch > /dev/null 2>%1
+  $NSDC_PROG -c $NSD_CONF stop
+  RETVAL=$?
+  # was nsdc successful?
+  [ "$RETVAL" -eq 0 ] || killproc $NSD_PROG -TERM >/dev/null 2>&1
+  if [ $RETVAL -eq 0 ] ; then
+     rm -f $NSD_PIDFILE
+     rm -f /var/lock/subsys/nsd
+     # ensure notifies are sent at startup
+     rm -f $NSD_XFRDFILE
+  fi
+  echo
+  return $RETVAL
 }
 
 restart() {
-	stop
-	start
+  stop
+  start
 }
 
 RETVAL=0
@@ -81,10 +97,10 @@
         [ -f /var/lock/subsys/nsd ] && restart || :
 	;;
   status)
-	/usr/sbin/nsdc running
+	$NSDC_PROG -c $NSD_CONF running
 	;;
   stats|reload|rebuild|running|update|notify)
-	/usr/sbin/nsdc $1 
+	$NSDC_PROG -c $NSD_CONF $1 
 	;;
   *)
 	echo $"Usage: $0 {start|stop|status|restart|condrestart|stats|notify|reload|rebuild|running|update}"


Index: nsd.spec
===================================================================
RCS file: /cvs/extras/rpms/nsd/F-10/nsd.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- nsd.spec	9 Oct 2008 20:11:21 -0000	1.38
+++ nsd.spec	10 Apr 2009 18:05:04 -0000	1.39
@@ -1,12 +1,13 @@
-Summary: NSD is a complete implementation of an authoritative DNS name server
+Summary: Fast and lean authoritative DNS Name Server
 Name: nsd
-Version: 3.1.1
+Version: 3.2.1
 Release: 1%{?dist}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
 Source1: nsd.init
 Source2: nsd.cron
+Source3: nsd.sysconfig
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: flex, openssl-devel
@@ -19,7 +20,7 @@
 (thanks to Olaf).
 
 %prep
-%setup -q 
+%setup -q
 
 %build
 %configure --enable-bind8-stats --enable-plugins --enable-checking \
@@ -45,6 +46,8 @@
 install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
 install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
 install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
+install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
+install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
 
 # change .sample to normal config files
 head -76 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample > %{buildroot}%{_sysconfdir}/nsd/nsd.conf
@@ -62,6 +65,7 @@
 %dir %{_sysconfdir}/nsd/
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.conf
 #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
 %attr(0755,root,root) %{_initrddir}/%{name}
 %{_sysconfdir}/cron.hourly/nsd
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
@@ -91,6 +95,11 @@
 fi
 
 %changelog
+* Fri Apr 10 2009 Paul Wouters <paul at xelerance.com> - 3.2.1-1
+- updated to 3.2.1
+- fixed /dev/nul which cause a file \%%1 to be written by cron
+- merged in Ville Mattila's patches for nsd initscript and sysconfig
+
 * Thu Oct  9 2008 Paul Wouters <paul at xelerance.com> - 3.1.1-1
 - updated to 3.1.1
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/nsd/F-10/sources,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- sources	9 Oct 2008 20:11:21 -0000	1.18
+++ sources	10 Apr 2009 18:05:04 -0000	1.19
@@ -1,3 +1 @@
-b96ac5e0e5f13cf99c0d07fa9d7ddabd  nsd-3.0.8.tar.gz
-69225bf59ae82181ca09af34c139fb6d  nsd-3.1.0.tar.gz
-93cb2d0fa005ab46f81ef00e4951a804  nsd-3.1.1.tar.gz
+66b602a793b851ad109403d3d2654fad  nsd-3.2.1.tar.gz




More information about the scm-commits mailing list