]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
'uname -o' is not portable, suppress error message; remove spurious cat tmp.out;...
authorMark Andrews <marka@isc.org>
Tue, 15 Aug 2017 08:02:24 +0000 (18:02 +1000)
committerMark Andrews <marka@isc.org>
Tue, 15 Aug 2017 08:02:24 +0000 (18:02 +1000)
bin/tests/system/metadata/clean.sh
bin/tests/system/metadata/tests.sh

index 970ab1a8b3ac42195002c05ab7dd87dcc9908333..f79e97ea326fe19d4dde1d0ac0e651efb8e03f36 100644 (file)
@@ -12,4 +12,5 @@ rm -f pending.key rolling.key standby.key inact.key
 rm -f prerev.key postrev.key oldstyle.key
 rm -f keys sigs
 rm -f tmp.out
+rm -f settime1.test* settime2.test*
 rm -f ns*/named.lock
index 4ea89d799290e73e0b9bde000bf8970bc79cde55..e7427ad3c8dd3d09bdab3a9c2083d4753008c759 100644 (file)
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
 pzone=parent.nil pfile=parent.db
 czone=child.parent.nil cfile=child.db
 status=0
-n=0
+n=1
 
 echo "I:setting key timers"
 $SETTIME -A now+15s `cat rolling.key` > /dev/null
@@ -137,18 +137,17 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
 echo "I:checking warning about permissions change on key with dnssec-settime ($n)"
-if [ `uname -o` == Cygwin ]; then
+uname=`uname -o 2> /dev/null`
+if [ Cygwin == "$uname"  ]; then
        echo "I: Cygwin detected, skipping"
 else
        ret=0
        # settime should print a warning about changing the permissions
        chmod 644 `cat oldstyle.key`.private
-       $SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
-       grep "warning" tmp.out > /dev/null 2>&1 || ret=1
-       cat tmp.out
-       $SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
-       grep "warning" tmp.out > /dev/null 2>&1 && ret=1
-       cat tmp.out
+       $SETTIME -P none `cat oldstyle.key` > settime1.test$n 2>&1 || ret=1
+       grep "warning: Permissions on the file.*have changed" settime1.test$n > /dev/null 2>&1 || ret=1
+       $SETTIME -P none `cat oldstyle.key` > settime2.test$n 2>&1 || ret=1
+       grep "warning: Permissions on the file.*have changed" settime2.test$n > /dev/null 2>&1 && ret=1
        n=`expr $n + 1`
        if [ $ret != 0 ]; then echo "I:failed"; fi
        status=`expr $status + $ret`