rpms/nsd/devel nsd.sysconfig, NONE, 1.1 nsd.cron, 1.4, 1.5 nsd.init, 1.11, 1.12 nsd.spec, 1.49, 1.50
Paul Wouters
pwouters at fedoraproject.org
Fri Apr 10 18:05:35 UTC 2009
- Previous message: 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
- Next message: rpms/nsd/devel nsd.zones2nsd.conf,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pwouters
Update of /cvs/extras/rpms/nsd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12914/devel
Modified Files:
nsd.cron nsd.init nsd.spec
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.cron
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.cron,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nsd.cron 13 Nov 2007 16:31:39 -0000 1.4
+++ nsd.cron 10 Apr 2009 18:05:04 -0000 1.5
@@ -6,7 +6,7 @@
# versa
# Ideally check if ixfr.db newer then any zones, only then do
-/usr/sbin/nsdc patch > /dev/nul 2>%1
+/usr/sbin/nsdc 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.
@@ -19,8 +19,8 @@
if [ $zonefile -nt /var/lib/nsd/nsd.db ]
then
echo "Zone $zonefile update requires nsd.db rebuild"
- /usr/sbin/nsdc rebuild > /dev/nul 2>%1
- /usr/sbin/nsdc reload > /dev/nul 2>%1
+ /usr/sbin/nsdc rebuild > /dev/null 2>%1
+ /usr/sbin/nsdc reload > /dev/null 2>%1
break
fi
done
@@ -29,4 +29,4 @@
# 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/nul 2>%1
+# /usr/sbin/nsdc notify > /dev/null 2>%1
Index: nsd.init
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.init,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- nsd.init 9 Mar 2009 00:14:14 -0000 1.11
+++ nsd.init 10 Apr 2009 18:05:04 -0000 1.12
@@ -12,14 +12,17 @@
# Provides: nsd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $network $syslog
-# Default-Start:
+# Default-Stop: 0 11 89
# Short-Description: start|stop|status|restart|try-restart|reload|force-reload DNS server
# Description: control NSD implementation of DNS server
### END INIT INFO
-#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/rc.d/init.d/functions
@@ -37,14 +40,14 @@
[ "${NETWORKING}" = "no" ] && exit 1
# Sanity checks.
- [ -f /etc/nsd/nsd.conf ] || exit 5
- [ -x /usr/sbin/nsd ] || exit 5
+ [ -f $NSD_CONF ] || exit 5
+ [ -x $NSD_PROG ] || exit 5
- echo -n $"Starting nsd:"
- /usr/sbin/nsdc rebuild >/dev/null 2>%1
- nsd $OTHER_NSD_OPTS
- RETVAL=$?
- echo
+ 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
@@ -54,21 +57,21 @@
}
stop() {
- echo -n $"Stopping nsd: "
- # save state to zonefiles
- /usr/sbin/nsdc patch > /dev/null 2>%1
- /usr/sbin/nsdc stop
- RETVAL=$?
- # was nsdc successful?
- [ "$RETVAL" -eq 0 ] || killproc nsd -TERM >/dev/null 2>&1
- if [ $RETVAL -eq 0 ] ; then
- rm -f /var/run/nsd/nsd.pid
- rm -f /var/lock/subsys/nsd
- # ensure notifies are sent at startup
- rm -f /var/lib/nsd/xfrd.state
- fi
- echo
- return $RETVAL
+ echo -n $"Stopping nsd: "
+ # 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() {
@@ -93,14 +96,14 @@
[ -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}"
exit 1
esac
-exit $RETVAL
+exit $?
Index: nsd.spec
===================================================================
RCS file: /cvs/extras/rpms/nsd/devel/nsd.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- nsd.spec 9 Mar 2009 00:31:23 -0000 1.49
+++ nsd.spec 10 Apr 2009 18:05:04 -0000 1.50
@@ -1,13 +1,13 @@
-Summary: fast and lean authoritative DNS name server
+Summary: Fast and lean authoritative DNS Name Server
Name: nsd
Version: 3.2.1
-Release: 5%{?dist}
+Release: 6%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
-#Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
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
@@ -46,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
@@ -63,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}
@@ -92,6 +95,11 @@
fi
%changelog
+* Thu Apr 09 2009 Ville Mattila <vmattila at csc.fi> - 3.2.1-6
+- Make various file paths used by the nsd.init script configurable
+ from /etc/sysconfig/nsd.
+- Add template /etc/sysconfig/nsd.
+
* Sun Mar 08 2009 Paul Wouters <paul at xelerance.com> - 3.2.1-5
- nsd used the 'named' subsystem in one call in the init script
- Previous message: 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
- Next message: rpms/nsd/devel nsd.zones2nsd.conf,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list