Name: srvd-athena-named-conf
Version: 8.2
Release: 5
Provides: athena-named-conf
Copyright: MIT
Distribution: MIT SIPB Linux-Athena
Vendor: The MIT Student Information Processing Board
Packager: linux-dev@mit.edu
Group: Athena
Buildroot: /tmp/buildroot
Summary: MITnet bind configuration files
Requires: bind

%description
bind configuration files appropriate for machines on MITnet.

%post
umask 22

if [ -f /etc/resolv.conf ]; then
    # Ok, /etc/resolv.conf exists already.
    # Make sure 127.0.0.1 is in the resolv.conf

    grep -q 127.0.0.1 /etc/resolv.conf ||
	( mv -f /etc/resolv.conf /etc/resolv.conf.athsave &&
	( echo "nameserver 127.0.0.1" ; cat /etc/resolv.conf.athsave ) > \
		/etc/resolv.conf )

else
    # Create a resolv.conf file
    cat > /etc/resolv.conf <<EOF
nameserver 127.0.0.1
nameserver 18.70.0.160
nameserver 18.71.0.151
EOF
fi

%files
%config /etc/named.conf
%config /etc/named.localhost
%config /etc/named.localhost.rev
%config /etc/named.root

