handle permission denied

(cherry picked from commit 4c375c6fa8)
This commit is contained in:
Mark Andrews
2016-02-02 12:38:40 +11:00
parent eaed2bda9c
commit c4cf9df942

View File

@@ -252,7 +252,8 @@ status=`expr $status + $ret`
echo "I:attempting to delete a policy zone ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone 'policy in internal' 2> rndc.out.ns2.$n >&1
grep 'cannot be deleted' rndc.out.ns2.$n > /dev/null || ret=1
grep 'cannot be deleted' rndc.out.ns2.$n > /dev/null ||
grep 'permission denied' rndc.out.ns2.$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`