From a608f84c2fc16815856e8a2482d0626892815c4a Mon Sep 17 00:00:00 2001 From: jweiss Date: Mon, 9 Mar 2009 22:58:23 +0000 Subject: [PATCH] use abstraction barriers (init script) for restarting named make the hesiod files world readable so they work with a named running as a non-root user correct chmod-ing will wait until the hesiod servers are consistant RHEL 5.2. Much additional cleanup of paths should occur at that time too. --- gen/hesiod.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gen/hesiod.sh b/gen/hesiod.sh index fe5e84ce..df865d6f 100644 --- a/gen/hesiod.sh +++ b/gen/hesiod.sh @@ -29,7 +29,7 @@ SRC_DIR=/etc/athena/_nameserver # Directory into which we will put the final product DEST_DIR=/etc/athena/nameserver -NAMED=/etc/athena/named +INIT=/etc/init.d/athena-bind NAMED_PID=/var/athena/named.pid # Create the destination directory if it doesn't exist @@ -78,6 +78,7 @@ do # Make sure the file is not zero-length if test ! -z $file then + chmod o+r $file mv -f $file $DEST_DIR if test $? -ne 0 then @@ -96,13 +97,11 @@ done # First, get statistics /usr/athena/etc/rndc stats sleep 1 -kill -KILL `cat $NAMED_PID` +$INIT stop rm -f $NAMED_PID # Restart named. -$NAMED -echo named started - +$INIT start sleep 1 # This timeout is implemented by having the shell check TIMEOUT times # for the existance of $NAMED_PID and to sleep INTERVAL seconds -- 2.45.1