rpms/nsd/F-9 nsd.sysconfig, NONE, 1.1 nsd.init, 1.8, 1.9 nsd.spec, 1.33, 1.34 sources, 1.15, 1.16

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


Author: pwouters

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

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-9/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:04 -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-9/nsd.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- nsd.spec	30 Jun 2008 04:26:20 -0000	1.33
+++ nsd.spec	10 Apr 2009 18:05:04 -0000	1.34
@@ -1,8 +1,8 @@
-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.0
+Version: 3.2.1
 Release: 1%{?dist}
-License: BSD-like
+License: BSD
 Url: http://www.nlnetlabs.nl/nsd/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
 Source1: nsd.init
@@ -88,6 +88,14 @@
 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
+- Applied Ville Mattila's changes to support non-default locations
+
+* Mon Sep 15 2008 Paul Wouters <paul at xelerance.com> - 3.1.1-1
+- Updated to new version
+
 * Mon Jun 30 2008 Paul Wouters <paul at xelerance.com> - 3.1.0-1
 - Updated to new version
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/nsd/F-9/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sources	30 Jun 2008 04:20:58 -0000	1.15
+++ sources	10 Apr 2009 18:05:04 -0000	1.16
@@ -1,3 +1 @@
-37558edef2fe9d9052aafeb73effd4ac  nsd-3.0.7.tar.gz
-b96ac5e0e5f13cf99c0d07fa9d7ddabd  nsd-3.0.8.tar.gz
-69225bf59ae82181ca09af34c139fb6d  nsd-3.1.0.tar.gz
+66b602a793b851ad109403d3d2654fad  nsd-3.2.1.tar.gz




More information about the fedora-extras-commits mailing list