set SRC_DIR=/etc/athena/_nameserver
# Directory into which we will put the final product
set DEST_DIR=/etc/athena/nameserver
-# Files to verify nameserver loaded-if empty, no check is done
-set CHECKFILES=""
# Create the destination directory if it doesn't exist
if (! -d $DEST_DIR) then
rm -f /etc/named.pid
# Restart named.
-(unlimit; /etc/named)
+(unlimit; /etc/named&)
+sleep 5
+mv /etc/named.pid /etc/named.pid.restart
# This timeout is implemented by having the shell check TIMEOUT times
# for the existance of /etc/named.pid and to sleep INTERVAL seconds
# Did it time out?
if ($i == $TIMEOUT) exit $SMS_NAMED
-# Verify that the nameserver is answering queries for the new data
-cd $DEST_DIR
-foreach f ( $CHECKFILES )
- set temp=`tac $f | egrep -v '^;' | head -1`
- set hes=`/bin/echo $temp | awk '{print $1}'`
- set ent=`echo $hes | rev | sed 's/\(.*\)\.\(.*\)/\2/' | rev`
- set type=`echo $hes | rev | sed 's/\(.*\)\.\(.*\)/\1/' | rev`
- hesinfo $ent $type > /dev/null
- if ($status == 1) then
- exit $SMS_HESFILE
- endif
-end
-
# Clean up!
/bin/rm -f $TARFILE
/bin/rm -f $0