# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
-# $Id: tests.sh,v 1.16.2.1 2000/07/10 04:52:04 gson Exp $
+# $Id: tests.sh,v 1.16.2.2 2000/07/12 18:02:32 gson Exp $
#
# Perform tests
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
-kill -TERM `cat ns3/named.pid`
+kill -TERM `cat ns3/named.pid` > /dev/null 2>&1
+if [ $? != 0 ]; then
+ echo "I:ns3 died before a SIGTERM was sent"
+ status=1
+ rm -f ns3/named.pid
+fi
rm -f ns2/example.db
cp ns2/example3.db ns2/example.db
sleep 6
if [ -f ns3/named.pid ]; then
echo "I:ns3 didn't die when sent a SIGTERM"
- kill -KILL `cat ns3/named.pid`
+ kill -KILL `cat ns3/named.pid` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:ns3 died before a SIGKILL was sent"
+ status=1
+ rm -f ns3/named.pid
+ fi
status=1
fi
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
rm -f ns2/example.db
-kill -TERM `cat ns2/named.pid`
+kill -TERM `cat ns2/named.pid` > /dev/null 2>&1
+if [ $? != 0 ]; then
+ echo "I:ns2 died before a SIGTERM was sent"
+ status=1
+ rm -f ns2/named.pid
+fi
sleep 6
if [ -f ns2/named.pid ]; then
echo "I:ns2 didn't die when sent a SIGTERM"
- kill -KILL `cat ns2/named.pid`
+ kill -KILL `cat ns2/named.pid` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:ns2 died before a SIGKILL was sent"
+ status=1
+ rm -f ns2/named.pid
+ fi
status=1
fi
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
-# $Id: stop.sh,v 1.8.2.1 2000/07/10 04:51:50 gson Exp $
+# $Id: stop.sh,v 1.8.2.2 2000/07/12 18:02:29 gson Exp $
#
# Stop name servers.
do
pidfile="$d/named.pid"
if [ -f $pidfile ]; then
- kill -TERM `cat $pidfile`
+ kill -TERM `cat $pidfile` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:$d died before a SIGTERM was sent"
+ status=`expr $status + 1`
+ rm -f $pidfile
+ fi
fi
done
do
pidfile="$d/lwresd.pid"
if [ -f $pidfile ]; then
- kill -TERM `cat $pidfile`
+ kill -TERM `cat $pidfile` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:$d died before a SIGTERM was sent"
+ status=`expr $status + 1`
+ rm -f $pidfile
+ fi
fi
done
if [ -f $pidfile ]; then
echo "I:$d didn't die when sent a SIGTERM"
status=`expr $status + 1`
- kill -KILL `cat $pidfile`
+ kill -KILL `cat $pidfile` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:$d died before a SIGKILL was sent"
+ status=`expr $status + 1`
+ rm -f $pidfile
+ fi
rm -f $pidfile
fi
done
if [ -f $pidfile ]; then
echo "I:$d didn't die when sent a SIGTERM"
status=`expr $status + 1`
- kill -KILL `cat $pidfile`
+ kill -KILL `cat $pidfile` > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "I:$d died before a SIGKILL was sent"
+ status=`expr $status + 1`
+ rm -f $pidfile
+ fi
rm -f $pidfile
fi
done