3497. [func] When deleting a slave/stub zone using 'rndc delzone'

report the files that were being used so they can
                        be cleaned up if desired. [RT #27899]

Squashed commit of the following:

commit 0e4e69d0c3153fe94aaa375b908cf7e3e45b5059
Author: Mark Andrews <marka@isc.org>
Date:   Thu Feb 21 17:01:44 2013 +1100

    report the zones to be removed rather than removing them

commit 5d247ac592eef64c4c467d99af4983b8c1ff998f
Author: Mark Andrews <marka@isc.org>
Date:   Wed Feb 20 15:05:47 2013 +1100

    remove slave/stub files when deleting a zone using delzone
This commit is contained in:
Mark Andrews
2013-02-26 14:48:21 +11:00
parent f97d56e757
commit 118bdfd8c4
6 changed files with 72 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
# $Id: clean.sh,v 1.3 2010/09/15 03:32:34 marka Exp $
rm -f dig.out.*
rm -f rndc.out.*
rm -f rndc.out*
rm -f ns2/named.conf
rm -f */named.memstats
rm -f ns2/*.nzf

View File

@@ -133,6 +133,18 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:attempting to delete slave zone with inline signing ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone inlineslave.example 2>&1 > rndc.out2.test$n
grep '^inlineslave.bk$' rndc.out2.test$n > /dev/null || {
echo "I:failed to report inlineslave.bk"; ret=1;
}
grep '^inlineslave.bk.signed$' rndc.out2.test$n > /dev/null || {
echo "I:failed to report inlineslave.bk.signed"; ret=1;
}
n=`expr $n + 1`
status=`expr $status + $ret`
echo "I:reconfiguring server with multiple views"
rm -f ns2/named.conf
cp -f ns2/named2.conf ns2/named.conf