}
status=0
+n=0
cd $CONFDIR
-echo "I:testing log file validity (named -g + only plain files allowed)"
+n=`expr $n + 1`
+echo "I:testing log file validity (named -g + only plain files allowed) ($n)"
# First run with a known good config.
echo > $PLAINFILE
cp $PLAINCONF named.conf
-$myRNDC reconfig
+$myRNDC reconfig > rndc.out.test$n 2>&1
grep "reloading configuration failed" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try directory, expect failure
-echo "I: testing directory as log file (named -g)"
+n=`expr $n + 1`
+echo "I: testing directory as log file (named -g) ($n)"
echo > named.run
rm -rf $DIRFILE
mkdir -p $DIRFILE >/dev/null 2>&1
then
cp $DIRCONF named.conf
echo > named.run
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
grep "checking logging configuration failed: invalid file" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try pipe file, expect failure
-echo "I: testing pipe file as log file (named -g)"
+n=`expr $n + 1`
+echo "I: testing pipe file as log file (named -g) ($n)"
echo > named.run
rm -f $PIPEFILE
mkfifo $PIPEFILE >/dev/null 2>&1
then
cp $PIPECONF named.conf
echo > named.run
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
grep "checking logging configuration failed: invalid file" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try symlink file to plain file, expect success
-echo "I: testing symlink to plain file as log file (named -g)"
+n=`expr $n + 1`
+echo "I: testing symlink to plain file as log file (named -g) ($n)"
# Assume success
echo > named.run
echo > $PLAINFILE
if [ $? -eq 0 ]
then
cp $SYMCONF named.conf
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
echo > named.run
grep "reloading configuration failed" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
status=0
-echo "I:testing log file validity (only plain files allowed)"
+n=`expr $n + 1`
+echo "I:testing log file validity (only plain files allowed) ($n)"
# First run with a known good config.
echo > $PLAINFILE
cp $PLAINCONF named.conf
-$myRNDC reconfig
+$myRNDC reconfig > rndc.out.test$n 2>&1
grep "reloading configuration failed" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try directory, expect failure
-echo "I: testing directory as log file"
+n=`expr $n + 1`
+echo "I: testing directory as log file ($n)"
echo > named.run
rm -rf $DIRFILE
mkdir -p $DIRFILE >/dev/null 2>&1
then
cp $DIRCONF named.conf
echo > named.run
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
grep "configuring logging: invalid file" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try pipe file, expect failure
-echo "I: testing pipe file as log file"
+n=`expr $n + 1`
+echo "I: testing pipe file as log file ($n)"
echo > named.run
rm -f $PIPEFILE
mkfifo $PIPEFILE >/dev/null 2>&1
then
cp $PIPECONF named.conf
echo > named.run
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
grep "configuring logging: invalid file" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
then
fi
# Now try symlink file to plain file, expect success
-echo "I: testing symlink to plain file as log file"
+n=`expr $n + 1`
+echo "I: testing symlink to plain file as log file ($n)"
# Assume success
status=0
echo > named.run
if [ $? -eq 0 ]
then
cp $SYMCONF named.conf
- $myRNDC reconfig
+ $myRNDC reconfig > rndc.out.test$n 2>&1
echo > named.run
grep "reloading configuration failed" named.run > /dev/null 2>&1
if [ $? -ne 0 ]
status=0
+n=`expr $n + 1`
+echo "I:testing default logfile using named -L file ($n)"
# Now stop the server again and test the -L option
rm -f $DLFILE
$PERL ../../stop.pl .. ns1
if [ -f "$DLFILE" ]; then
echo "I: testing default logfile using named -L succeeded"
else
- echo "I:testing default logfile using named -L failed"
+ echo "I: testing default logfile using named -L failed"
echo "I:exit status: 1"
exit 1
fi