rpms/bind/devel named.conf, NONE, 1.1 named.empty, NONE, 1.1 named.localhost, NONE, 1.1 named.loopback, NONE, 1.1 bind.spec, 1.186, 1.187 named.init, 1.52, 1.53 named.rfc1912.zones, 1.3, 1.4 localdomain.zone, 1.1, NONE localhost.zone, 1.1, NONE named.broadcast, 1.1, NONE named.caching-nameserver.conf, 1.7, NONE named.ip6.local, 1.1, NONE named.local, 1.1, NONE named.zero, 1.1, NONE

Adam Tkac (atkac) fedora-extras-commits at redhat.com
Thu Jun 14 15:13:37 UTC 2007


Author: atkac

Update of /cvs/pkgs/rpms/bind/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22109

Modified Files:
	bind.spec named.init named.rfc1912.zones 
Added Files:
	named.conf named.empty named.localhost named.loopback 
Removed Files:
	localdomain.zone localhost.zone named.broadcast 
	named.caching-nameserver.conf named.ip6.local named.local 
	named.zero 
Log Message:
- major changes in initscript. Could be LSB compatible
- removed caching-nameserver subpackage and move configfiles from there into main bind package as default configuration
- major changes in default configuration



--- NEW FILE named.conf ---
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver 
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on 
// caching-nameserver package upgrade.
//

options {
	listen-on port 53 { 127.0.0.1; };
	listen-on-v6 port 53 { ::1; };
	directory 	"/var/named";
	dump-file 	"/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
	allow-query     { localhost; };
	recursion yes;
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
	type hint;
	file "named.ca";
};

include "/etc/named.rfc1912.zones";



--- NEW FILE named.empty ---
$TTL 1D
@	IN SOA	localhost. root.localhost. (
						0	; serial
						3H	; refresh
						1H	; retry
						1W	; expire
						3H )	; minimum
	IN	NS	localhost.


--- NEW FILE named.localhost ---
$TTL 1D
@	IN SOA	localhost. root.localhost. (
						0	; serial
						3H	; refresh
						1H	; retry
						1W	; expire
						3H )	; minimum
@	IN	NS	localhost.
@	IN	A	127.0.0.1
@	IN	AAAA	::1


--- NEW FILE named.loopback ---
$TTL 1D
@	IN SOA	localhost. root.localhost. (
						0	; serial
						3H	; refresh
						1H	; retry
						1W	; expire
						3H )	; minimum
	IN	NS	localhost.
	IN	PTR	localhost.


Index: bind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bind/devel/bind.spec,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -r1.186 -r1.187
--- bind.spec	4 Jun 2007 13:44:35 -0000	1.186
+++ bind.spec	14 Jun 2007 15:13:02 -0000	1.187
@@ -16,7 +16,7 @@
 Name: 		bind
 License: 	BSD-like
 Version: 	9.4.1
-Release: 	5%{?dist}
+Release: 	6%{?dist}
 Epoch:   	31
 Url: 		http://www.isc.org/products/BIND/
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -37,21 +37,18 @@
 Source12: 	README.sdb_pgsql
 Source13: 	namedSetForwarders
 Source14: 	namedGetForwarders
-Source16: 	named.caching-nameserver.conf
+Source16: 	named.conf
 Source17: 	named.root
-Source18: 	named.local
-Source19: 	localhost.zone
-Source20: 	localdomain.zone
-Source21: 	named.ip6.local
-Source22: 	named.broadcast
-Source23: 	named.zero
-Source24:	Copyright.caching-nameserver
-Source26: 	bind-chroot-admin.in
-Source27:       named.rfc1912.zones
-Source28:	libbind.pc
-Source29:	named.conf.sample
-Source30:       named.rfc1912.zones.sample
-Source31:       named.root.hints
+Source18: 	named.localhost
+Source19:	named.loopback
+Source20: 	named.empty
+Source21:	Copyright.caching-nameserver
+Source22: 	bind-chroot-admin.in
+Source23:       named.rfc1912.zones
+Source24:	libbind.pc
+Source25:	named.conf.sample
+Source26:       named.rfc1912.zones.sample
+Source27:       named.root.hints
 
 # Common patches
 Patch0:  	bind-9.2.0rc3-varrun.patch
@@ -94,6 +91,8 @@
 Requires(post): grep, chkconfig >= 1.3.26
 Requires(pre): 	shadow-utils
 Requires(preun):chkconfig >= 1.3.26
+Obsoletes: bind-config
+Provides:  bind-config
 %if %{selinux}
 Requires(post):	policycoreutils
 %endif
@@ -152,31 +151,6 @@
 required for development with ISC BIND 9 and BIND 8
 
 
-%package -n caching-nameserver
-Summary:   Default BIND configuration files for a caching nameserver
-Group: 	   System Environment/Daemons
-Obsoletes: bind-config
-Provides:  bind-config
-Requires:    bind = %{epoch}:%{version}-%{release}
-Requires(post):   grep
-Requires(postun): grep
-%if %{selinux}
-Requires(post): policycoreutils
-Conflicts: selinux-policy-strict < 2.2.0
-Conflicts: selinux-policy-targeted < 2.2.0
-%endif
-
-%description -n caching-nameserver
-The  caching-nameserver package includes the configuration files which will make
-the ISC BIND named DNS name server act as a simple caching nameserver.
-A caching nameserver is a DNS Resolver, as defined in RFC 1035, section 7.
-ISC BIND named(8) provides a very efficient, flexible and robust resolver as
-well as a server of authoritative DNS data - many users use this package
-along with BIND to implement their primary system DNS resolver service.
-If you would like to set up a caching name server, you'll need to install
-bind, bind-libs, and bind-utils along with this package.
-
-
 %package   chroot
 Summary:   A chroot runtime environment for the ISC BIND DNS server, named(8)
 Group: 	   System Environment/Daemons
@@ -391,7 +365,7 @@
 %if %{LIBBIND}
 gunzip < %{SOURCE9} | (cd ${RPM_BUILD_ROOT}/usr/share; tar -xpf -)
 mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig
-install -m 644 %{SOURCE28} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libbind.pc
+install -m 644 %{SOURCE24} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libbind.pc
 %endif
 %if %{WITH_DBUS}
 mkdir -p ${RPM_BUILD_ROOT}/etc/dbus-1/system.d
@@ -434,31 +408,28 @@
 #
 # Ghost config files:
 touch ${RPM_BUILD_ROOT}/etc/named.conf
-# caching-nameserver files:
+# configuration files:
 mkdir -p ${RPM_BUILD_ROOT}/{etc,var/named}
-install -m 644 %{SOURCE16} ${RPM_BUILD_ROOT}/etc/named.caching-nameserver.conf
-install -m 644 %{SOURCE27} ${RPM_BUILD_ROOT}/etc/named.rfc1912.zones
+install -m 644 %{SOURCE16} ${RPM_BUILD_ROOT}/etc/named.conf
+install -m 644 %{SOURCE23} ${RPM_BUILD_ROOT}/etc/named.rfc1912.zones
 install -m 644 %{SOURCE17} ${RPM_BUILD_ROOT}/var/named/named.ca
-install -m 644 %{SOURCE18} ${RPM_BUILD_ROOT}/var/named/named.local
-install -m 644 %{SOURCE19} ${RPM_BUILD_ROOT}/var/named/localhost.zone
-install -m 644 %{SOURCE20} ${RPM_BUILD_ROOT}/var/named/localdomain.zone
-install -m 644 %{SOURCE21} ${RPM_BUILD_ROOT}/var/named/named.ip6.local
-install -m 644 %{SOURCE22} ${RPM_BUILD_ROOT}/var/named/named.broadcast
-install -m 644 %{SOURCE23} ${RPM_BUILD_ROOT}/var/named/named.zero
-for f in /etc/named.caching-nameserver.conf /var/named/{named.ca,named.local,localhost.zone,localdomain.zone,named.ip6.local,named.broadcast,named.zero}; do
+install -m 644 %{SOURCE18} ${RPM_BUILD_ROOT}/var/named/named.localhost
+install -m 644 %{SOURCE19} ${RPM_BUILD_ROOT}/var/named/named.loopback
+install -m 644 %{SOURCE20} ${RPM_BUILD_ROOT}/var/named/named.empty
+for f in /etc/named.conf /var/named/{named.ca,named.localhost,named.loopback,named.empty}; do
     touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/$f;
 done
 install -m 644 %{SOURCE5}  ./rfc1912.txt
-install -m 644 %{SOURCE24} ./Copyright
+install -m 644 %{SOURCE21} ./Copyright
 # bind-chroot-admin script:
-sed -e 's^@BIND_CHROOT_PREFIX@^'%{chroot_prefix}'^;s^@BIND_DIR@^'%{bind_dir}'^' < %{SOURCE26} > bind-chroot-admin;
+sed -e 's^@BIND_CHROOT_PREFIX@^'%{chroot_prefix}'^;s^@BIND_DIR@^'%{bind_dir}'^' < %{SOURCE22} > bind-chroot-admin;
 install -m 754 bind-chroot-admin ${RPM_BUILD_ROOT}/%{_sbindir}
 # sample bind configuration files for %doc:
 mkdir -p sample/etc sample/var/named/{data,slaves}
-cp -fp %{SOURCE29} sample/etc/named.conf
-cp -fp %{SOURCE30} sample/etc/named.rfc1912.zones
-cp -fp %{SOURCE31} sample/etc/
-cp -fp %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} sample/var/named
+cp -fp %{SOURCE25} sample/etc/named.conf
+cp -fp %{SOURCE26} sample/etc/named.rfc1912.zones
+cp -fp %{SOURCE27} sample/etc/
+cp -fp %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} sample/var/named
 for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.internal.zone.db my.external.zone.db; do 
   echo '@ in soa localhost. root 1 3H 15M 1W 1D
   ns localhost.' > sample/var/named/$f; 
@@ -495,6 +466,10 @@
 	   /bin/sed -i -e 's^@KEY@^'`/usr/sbin/dns-keygen`'^' /etc/rndc.key ;
 	fi
         [ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
+
+   [ -x /sbin/restorecon] && /sbin/restorecon /etc/named.conf >/dev/null 2>&1 || :;
+   [ -x /sbin/restorecon] && /sbin/restorecon /etc/named.rfc1912.zones >/dev/null 2>&1 || :;
+   [ -x /usr/sbin/bind-chroot-admin ] && /usr/sbin/bind-chroot-admin --sync;
 fi
 :;
 
@@ -537,17 +512,6 @@
 %postun libs -p /sbin/ldconfig
 
 
-%post -n caching-nameserver
-if [ "$1" -gt 0 ]; then
-   /sbin/restorecon /etc/named.caching-nameserver.conf >/dev/null 2>&1 || :;
-   /sbin/restorecon /etc/named.rfc1912.zones >/dev/null 2>&1 || :;
-   if [ -x /usr/sbin/bind-chroot-admin ]; then
-       /usr/sbin/bind-chroot-admin --sync;
-   fi;
-fi;
-:;
-
-
 %post chroot
 if [ "$1" -gt 0 ]; then
    /usr/sbin/bind-chroot-admin --enable > /dev/null 2>&1;
@@ -609,6 +573,21 @@
 %files
 %defattr(0640,root,named,0750)
 %dir /var/named
+%config(noreplace) %verify(not link) /etc/named.conf
+%ghost %config(noreplace) %{chroot_prefix}/etc/named.conf
+%config(noreplace) %verify(not link) /etc/named.rfc1912.zones
+%ghost %config(noreplace) %{chroot_prefix}/etc/named.rfc1912.zones
+%config %verify(not link) /var/named/named.ca
+%ghost  %config %{chroot_prefix}/var/named/named.ca
+%config %verify(not link) /var/named/named.localhost
+%ghost  %config %{chroot_prefix}/var/named/named.localhost
+%config %verify(not link) /var/named/named.loopback
+%ghost  %config %{chroot_prefix}/var/named/named.loopback
+%config %verify(not link) /var/named/named.empty
+%ghost  %config %{chroot_prefix}/var/named/named.empty
+%defattr(0644,root,root,0755)
+%doc Copyright
+%doc rfc1912.txt
 %defattr(0660,named,named,0770)
 %dir /var/named/slaves
 %dir /var/named/data
@@ -623,8 +602,6 @@
 # %verify(not size,not md5) %config(noreplace) %attr(0640,root,named) /etc/rndc.conf
 # ^- Let the named internal default rndc.conf be used -
 #    rndc.conf not required unless it differs from default.
-%ghost %config(noreplace) /etc/named.conf
-# ^- Ensure something owns named.conf, even though it may not be installed at all
 %ghost %config(noreplace) /etc/rndc.conf
 # ^- The default rndc.conf which uses rndc.key is in named's default internal config -
 #    so rndc.conf is not necessary.
@@ -705,32 +682,6 @@
 %{_mandir}/man5/libbind-*
 %endif
 
-%files -n caching-nameserver
-%defattr(0640,root,named,0750)
-%config %verify(not link) /etc/named.caching-nameserver.conf
-%ghost %config %{chroot_prefix}/etc/named.caching-nameserver.conf
-%config %verify(not link) /etc/named.rfc1912.zones
-%ghost %config %{chroot_prefix}/etc/named.rfc1912.zones
-%ghost %config(noreplace) /etc/named.conf
-%ghost %config(noreplace) %{chroot_prefix}/etc/named.conf
-%config %verify(not link) /var/named/named.ca
-%ghost  %config %{chroot_prefix}/var/named/named.ca
-%config %verify(not link) /var/named/named.local
-%ghost  %config %{chroot_prefix}/var/named/named.local
-%config %verify(not link) /var/named/localhost.zone
-%ghost  %config %{chroot_prefix}/var/named/localhost.zone
-%config %verify(not link) /var/named/localdomain.zone
-%ghost  %config %{chroot_prefix}/var/named/localdomain.zone
-%config %verify(not link) /var/named/named.ip6.local
-%ghost  %config %{chroot_prefix}/var/named/named.ip6.local
-%config %verify(not link) /var/named/named.broadcast
-%ghost  %config %{chroot_prefix}/var/named/named.broadcast
-%config %verify(not link) /var/named/named.zero
-%ghost  %config %{chroot_prefix}/var/named/named.zero
-%defattr(0644,root,root,0755)
-%doc Copyright
-%doc rfc1912.txt
-
 %files chroot
 %defattr(0640,root,named,0750)
 %dir %prefix
@@ -740,7 +691,6 @@
 %dir  %prefix/var/run
 %dir  %prefix/var/named
 %ghost %config(noreplace) %prefix/etc/named.conf
-%ghost %config(noreplace) %prefix/etc/named.caching-nameserver.conf
 %ghost %config(noreplace) %prefix/etc/rndc.key
 %defattr(0660,named,named,0770)
 %dir %prefix/var/named/slaves
@@ -772,6 +722,12 @@
 %endif
 
 %changelog
+* Tue Jun 12 2007 Adam Tkac <atkac redhat com> 31:9.4.1-6.fc8
+- major changes in initscript. Could be LSB compatible now
+- removed caching-nameserver subpackage. Move configs from this
+  package to main bind package as default configuration and major
+  configuration cleanup
+
 * Tue Jun 04 2007 Adam Tkac <atkac redhat com> 31:9.4.1-5.fc8
 - very minor compatibility change in bind-chroot-admin (line 215)
 - enabled IDN support by default and don't distribute IDN libraries


Index: named.init
===================================================================
RCS file: /cvs/pkgs/rpms/bind/devel/named.init,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- named.init	4 Jun 2007 13:44:35 -0000	1.52
+++ named.init	14 Jun 2007 15:13:02 -0000	1.53
@@ -8,17 +8,22 @@
 # that is used to resolve host names to IP addresses.
 # probe: true
 
+# Return codes
+# - script (all except status command)
+#   - 2 invalid or excess argument(s)
+#   - 3 unimplemented feature (for example, "reload")
+#   - 4 user had insufficient privilege
+#   - 5 program is not installed
+#   - 6 program is not configured
+#   - 7 program is not running
+
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-# Source networking configuration.
-[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
-
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 1
-
 [ -r /etc/sysconfig/named ] && . /etc/sysconfig/named
 
+RETVAL=0
+
 # Don't kill named during clean-up
 NAMED_SHUTDOWN_TIMEOUT=${NAMED_SHUTDOWN_TIMEOUT:-100}
 
@@ -30,191 +35,180 @@
    fi;
 fi
 
-RETVAL=0
+# Run SDB backend?
 named='named'
-if [[ "$ENABLE_SDB" = [yY1]* ]] && [ -x /usr/sbin/named_sdb ]; then
-    named='named_sdb';
+if `echo "$ENABLE_SDB" | grep -q ^[yY1].*`; then
+  named='named_sdb';
 fi;
-prog=$named
 
-[ -x /usr/sbin/$named ] || exit 1
-
-nmdcOption()
-{ let i=0; 
-  for a in $*; 
-  do ((++i)); 
-     if [ $a = -c ]; then 
-	 ((++i)); 
-	 eval 'echo $'$i;
-     elif [[ $a = -c* ]]; then 
-	 echo ${a#-c}; 
-     fi; 
-  done; 
-}
+# Manage forwarders through D-BUS?
+for a in $OPTIONS; do
+  if [ $a  = "-D" ]; then
+    dbusEnabled=1;
+  fi;
+done
+if [ -z $dbusEnabled ] && [ -z "$DISABLE_NAMED_DBUS" ] ; then
+  for l in 0 1 2 3 4 5 6; do
+    if /sbin/chkconfig --level=$l NetworkManager >/dev/null 2>&1; then
+      dbusEnabled=1;
+    fi;
+  done
+  [ -z $NetworkManagerEnabled ] || OPTIONS="$OPTIONS -D";
+fi;
 
-named_c_option=`nmdcOption $OPTIONS`;
-named_conf=${named_c_option:-/etc/named.conf};
+# Check if all what named needs running
+start()
+{
+  # Source networking configuration.
+  [ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
+
+  # Check that networking is up
+  [ "${NETWORKING}" = "no" ] && exit 1
+
+
+  [ -x /usr/sbin/$named ] || exit 5
+
+  # Handle -c option
+  previous_option='unspecified';
+  for a in $OPTIONS; do
+    if [ $previous_option = '-c' ]; then
+      named_conf=$a;
+    fi;
+    previous_option=$a;
+  done;
 
-if [ ! -r ${ROOTDIR}${named_conf} ] ; then
-   if [ -z "$named_c_option" ] && [ -r ${ROOTDIR}/etc/named.caching-nameserver.conf ]; then
-       named_conf='/etc/named.caching-nameserver.conf';
-       OPTIONS="$OPTIONS -c ${named_conf}";
-   else
-       echo Locating $ROOTDIR/${named_conf} failed.
-       echo $"I can't find any configuration file. You can create it by system-config-bind"
-       echo $"or install caching-nameserver."
-       failure
-       echo;
-       exit 1;
-   fi;
-fi;
+  named_conf=${named_conf:-/etc/named.conf};
 
-dbusEnabled=0;
-for a in $OPTIONS; do
-    if [ $a  = "-D" ]; then
-	dbusEnabled=1;
+  if [ ! -r $named_conf ]; then
+    echo 'Cannot find configuration file. You could create it by system-config-bind'
+    exit 6;
+  fi;
+
+  # all pre-start is done, lets start named
+  echo -n $"Starting $named: "
+  if [ -n "`/sbin/pidof -o %PPID $named`" ]; then
+    echo -n $"$named: already running"
+    failure
+    echo
+    exit 1;
+  fi;
+
+  ckcf_options='-z'; # enable named-checkzone for each zone (9.3.1+) !
+  if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
+    OPTIONS="${OPTIONS} -t ${ROOTDIR}"
+    ckcf_options="$ckcf_options -t ${ROOTDIR}";
+    [ -s /etc/localtime ] && cp -fp /etc/localtime ${ROOTDIR}/etc/localtime;
+    [ -d ${ROOTDIR}/proc ] || mkdir -p ${ROOTDIR}/proc;
+    if ! egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then
+      mount --bind -n /proc ${ROOTDIR}/proc >/dev/null 2>&1;
+    fi
+    if [ ! -z $dbusEnabled ]; then
+      if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; then
+        mkdir -p ${ROOTDIR}/var/run/dbus
+        [ -d /var/run/dbus ] || mkdir -p /var/run/dbus;
+	mount --bind -n /var/run/dbus ${ROOTDIR}/var/run/dbus > /dev/null 2>&1;
+      fi;
     fi;
-done
+  fi
 
-if [ $dbusEnabled -eq 0 ] && [ -z "$DISABLE_NAMED_DBUS" ] ; then
-    NetworkManagerEnabled=0
-    for l in 0 1 2 3 4 5 6; do 
-	if /sbin/chkconfig --level=$l NetworkManager >/dev/null 2>&1; then 
-	    NetworkManagerEnabled=1; 
-	fi; 
-    done
-    if [ $NetworkManagerEnabled -eq 1 ]; then
-	OPTIONS="$OPTIONS -D";
+  RETVAL=0
+  # check if configuration is correct
+  if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] && /usr/sbin/named-checkconf $ckcf_options ${named_conf} >/dev/null 2>&1; then
+
+    daemon /usr/sbin/$named -u named ${OPTIONS};
+    RETVAL=$?
+    if [ $RETVAL -eq 0 ]; then
+      rm -f /var/run/named.pid;
+      rm -f /var/run/named_sdb.pid;
+      ln -s $ROOTDIR/var/run/named/named.pid /var/run/named.pid;
+      [ "$named" = "named_sdb" ] && ln -s $ROOTDIR/var/run/named/named.pid /var/run/named_sdb.pid;
     fi;
-    dbusEnabled=1;
-fi
 
-start() {
-        # Start daemons.
-        echo -n $"Starting $named: "
-	if [ -n "`/sbin/pidof -o %PPID $named`" ]; then
-		echo -n $"$named: already running"
-		failure
-		echo
-		return 1
-	fi
-	ckcf_options='-z'; # enable named-checkzone for each zone (9.3.1+) !
-	if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
-		OPTIONS="${OPTIONS} -t ${ROOTDIR}"
-		ckcf_options="$ckcf_options -t ${ROOTDIR}";
-		if [ -s /etc/localtime ]; then
-		    cp -fp /etc/localtime ${ROOTDIR}/etc/localtime
-		fi;
-		if [ ! -d ${ROOTDIR}/proc ]; then
-		    mkdir -p ${ROOTDIR}/proc
-		fi
-		if ! egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then
-		    mount --bind -n /proc ${ROOTDIR}/proc >/dev/null 2>&1 
-		fi
-		if [ $dbusEnabled -eq 1 ]; then
-		    if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; then
-			mkdir -p ${ROOTDIR}/var/run/dbus
-			if [ ! -d  /var/run/dbus ] ; then
-			    mkdir -p /var/run/dbus ;
-			fi;
-			mount --bind -n /var/run/dbus ${ROOTDIR}/var/run/dbus > /dev/null 2>&1;
-		    fi;		    
-		fi;		
-	fi
-
-        conf_ok=0;
-	if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] && /usr/sbin/named-checkconf $ckcf_options ${named_conf} >/dev/null 2>&1; then
-           conf_ok=1;
-        else
-	   RETVAL=$?;
-	fi
-	if [ $conf_ok -eq 1 ]; then	   
-	   daemon /usr/sbin/$named -u named ${OPTIONS};
-	   RETVAL=$?;
-	   if [ $RETVAL -eq 0 ]; then
-	       rm -f /var/run/named.pid
-	       rm -f /var/run/named_sdb.pid 2>/dev/null
-	       ln -s $ROOTDIR/var/run/named/named.pid /var/run/named.pid;
-	       if [ "$named" = "named_sdb" ]; then
-		   ln -s $ROOTDIR/var/run/named/named.pid /var/run/named_sdb.pid;
-	       fi;
-	   fi;
-	   if [ -n "`/sbin/pidof -o %PPID $named`" ]; then
-	       # Verify that named actually started (JM 2006-10-04)
-	       if [ ! -e $ROOTDIR/var/run/named/named.pid ]; then
-		  # If there is not a file containing the PID of the now running named daemon then create it (JM 2006-10-04)
-		  echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named.pid;
-		  if [ "$named" = "named_sdb" ]; then
-		     echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named_sdb.pid;
-		  fi;
-	       fi;
-	   fi;
-	else
-	   named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";	   
-	   echo
-	   echo $"Error in named configuration"':';
-	   echo "$named_err";
-	   failure
-	   echo
-	   if [ -x /usr/bin/logger ]; then
-	       echo "$named_err" | /usr/bin/logger -pdaemon.error -tnamed 
-           fi;
-           return $RETVAL;
-        fi;
- 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/named 
-        echo
-	return $RETVAL
+    if [ -n "`/sbin/pidof -o %PPID $named`" ]; then
+      # Verify that named actually started (JM 2006-10-04)
+      if [ ! -e $ROOTDIR/var/run/named/named.pid ]; then
+      # If there is not a file containing the PID of the now running named daemon then create it (JM 2006-10-04)
+        echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named.pid;
+        [ "$named" = "named_sdb" ] && echo `/sbin/pidof -o %PPID $named` > $ROOTDIR/var/run/named/named_sdb.pid;
+      fi;
+    fi;
+  else
+    named_err="`/usr/sbin/named-checkconf $ckcf_options $named_conf 2>&1`";	   
+    echo
+    echo "Error in named configuration:";
+    echo "$named_err";
+    failure
+    echo
+    [ -x /usr/bin/logger ] && echo "$named_err" | /usr/bin/logger -pdaemon.error -tnamed;
+    exit 2;
+  fi;
+  if [ $RETVAL -eq 0 ]; then
+    touch /var/lock/subsys/named;
+  else
+    exit 7;
+  fi
+  echo
+  return 0;
 }
+
 stop() {
-        # Stop daemons.
-        echo -n $"Stopping $named: "
-	/usr/sbin/rndc stop >/dev/null 2>&1 
-	RETVAL=$?
-	# is it still here?
-	if /sbin/pidof -o %PPID $named >/dev/null; then
-            timeout=0
-            while : ; do
-		if /sbin/pidof -o %PPID $named >/dev/null; then
-         	   if [ $timeout -ge $NAMED_SHUTDOWN_TIMEOUT ]; then
-		   	killproc $named -TERM >/dev/null 2>&1
-	           	RETVAL=$?
-			echo $"no response, killing with -TERM "
-			break
-        	   else
-			sleep 2 && echo -n "."
-			timeout=$((timeout+2))
-		   fi;
-		else
-		   break
-                fi;
-            done
-	fi;
-	if [ $RETVAL -eq 0 ]; then
-	    rm -f /var/lock/subsys/named
-	    rm -f /var/run/named.pid
-	    rm -f /var/run/named_sdb.pid 2>/dev/null	    
-	fi;
-	if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
-	    if egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then
-	       umount ${ROOTDIR}/proc >/dev/null 2>&1
-	    fi
-            if [ $dbusEnabled -eq 1 ]; then
-	       if egrep -q '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; then
-                  umount ${ROOTDIR}/var/run/dbus > /dev/null 2>&1
-               fi;
-	    fi;
-        fi;
-	if [ $RETVAL -eq 0 ]; then
-	    success
-	else
-	    failure
+  # Stop daemons.
+  echo -n $"Stopping $named: "
+  [ -x /usr/sbin/rndc ] && /usr/sbin/rndc stop >/dev/null 2>&1;
+  RETVAL=$?
+  # is it still here?
+  if /sbin/pidof -o %PPID $named >/dev/null; then
+    timeout=0
+    while : ; do
+      if /sbin/pidof -o %PPID $named >/dev/null; then
+        if [ $timeout -ge $NAMED_SHUTDOWN_TIMEOUT ]; then
+          killproc $named -TERM >/dev/null 2>&1
+          RETVAL=$?
+          echo $"no response, killing with -TERM "
+          break
+        else
+          sleep 2 && echo -n "."
+          timeout=$((timeout+2))
         fi;
-	echo
-	return $RETVAL
+      else
+        break
+      fi;
+    done
+  fi;
+
+  # remove pid files
+  if [ $RETVAL -eq 0 ]; then
+    rm -f /var/lock/subsys/named
+    rm -f /var/run/named.pid
+    rm -f /var/run/named_sdb.pid
+  fi;
+
+  # unmount mounted filesystems/directories
+  if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
+    if egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then
+      umount ${ROOTDIR}/proc >/dev/null 2>&1
+    fi
+    if [ ! -z $dbusEnabled ]; then
+      if egrep -q '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; then
+        umount ${ROOTDIR}/var/run/dbus > /dev/null 2>&1
+      fi;
+    fi;
+  fi;
+  if [ $RETVAL -eq 0 ]; then
+    success
+  else
+    failure
+    RETVAL=1
+  fi;
+  echo
+  return $RETVAL
 }
+
+
 rhstatus() {
-	/usr/sbin/rndc status
-	return $?
+  [ -x /usr/sbin/rndc ] && /usr/sbin/rndc status;
+  status /usr/bin/$named;
+  return $?
 }	
 restart() {
 	stop
@@ -231,25 +225,7 @@
         fi
 	[ "$RETVAL" -eq 0 ] && success $"$named reload" || failure $"$named reload"
         echo
-	return $?
-}
-probe() {
-	# named knows how to reload intelligently; we don't want linuxconf
-	# to offer to restart every time
-	/usr/sbin/rndc reload >/dev/null 2>&1 || echo start
-	return $?
-}
-checkconfig() {
-        ckcf_options='-z'; # enable named-checkzone for each zone (9.3.1+) !
-	if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
-		OPTIONS="${OPTIONS} -t ${ROOTDIR}"
-		ckcf_options="$ckcf_options -t ${ROOTDIR}";  
-	fi;
-	if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] && /usr/sbin/named-checkconf $ckcf_options ${named_conf} | cat ; then
-	    return 0;
-	else
-	    return 1;
-	fi
+	return $RETVAL
 }
 
 # See how we were called.
@@ -261,7 +237,8 @@
 		stop
 		;;
 	status)
-		rhstatus
+		rhstatus;
+		RETVAL=$?
 		;;
 	restart)
 		restart
@@ -272,16 +249,10 @@
 	reload)
 		reload
 		;;
-	probe)
-		probe
-		;;
-        checkconfig|configtest|check|test)
-	        checkconfig
-		;;
 	*)
-        	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|probe}"
-		exit 1
+        	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+		exit 3
 esac
 
-exit $?
+exit $RETVAL
 


Index: named.rfc1912.zones
===================================================================
RCS file: /cvs/pkgs/rpms/bind/devel/named.rfc1912.zones,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- named.rfc1912.zones	5 Sep 2006 11:03:16 -0000	1.3
+++ named.rfc1912.zones	14 Jun 2007 15:13:02 -0000	1.4
@@ -7,43 +7,34 @@
 // 
 // See /usr/share/doc/bind*/sample/ for example named configuration files.
 //
-zone "." IN {
-	type hint;
-	file "named.ca";
-};
 
-zone "localdomain" IN {
+zone "localhost.localdomain" IN {
 	type master;
-	file "localdomain.zone";
+	file "named.localhost";
 	allow-update { none; };
 };
 
 zone "localhost" IN {
 	type master;
-	file "localhost.zone";
+	file "named.localhost";
 	allow-update { none; };
 };
 
-zone "0.0.127.in-addr.arpa" IN {
+zone "1.0.0.127.in-addr.arpa" IN {
 	type master;
-	file "named.local";
+	file "named.loopback";
 	allow-update { none; };
 };
 
-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
-        type master;
-	file "named.ip6.local";
-	allow-update { none; };
-};
-
-zone "255.in-addr.arpa" IN {
+zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
 	type master;
-	file "named.broadcast";
+	file "named.loopback";
 	allow-update { none; };
 };
 
-zone "0.in-addr.arpa" IN {
+zone "0.in-addr.arpa" IN {			// "this" network
 	type master;
-	file "named.zero";
+	file "named.empty";
 	allow-update { none; };
 };
+


--- localdomain.zone DELETED ---


--- localhost.zone DELETED ---


--- named.broadcast DELETED ---


--- named.caching-nameserver.conf DELETED ---


--- named.ip6.local DELETED ---


--- named.local DELETED ---


--- named.zero DELETED ---




More information about the fedora-extras-commits mailing list