]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Force quiet mode when using testcrypto.sh directly
authorTom Krizek <tkrizek@isc.org>
Mon, 7 Nov 2022 14:58:40 +0000 (15:58 +0100)
committerTom Krizek <tkrizek@isc.org>
Thu, 22 Dec 2022 14:54:17 +0000 (15:54 +0100)
When testcrypto.sh is used as a standalone script, always use quiet mode
to avoid using undefined commands (such as echo_i) which require
inclusion of the entire conf.sh machinery.

(cherry picked from commit ba35a6df9cf4d18d1ccbfdf7a6130a48e5eef2b7)

bin/tests/system/testcrypto.sh

index e9dd0f97ffbedd65972aa1e03ba764734954fd11..dd1d583527dd39162ff6dd6f24188a56bd11c519 100755 (executable)
 # information regarding copyright ownership.
 
 SYSTEMTESTTOP=${SYSTEMTESTTOP:=..}
+prog=$0
+args=""
+quiet=0
+msg="cryptography"
 
 if test -z "$KEYGEN"; then
     . $SYSTEMTESTTOP/conf.sh
     alg="-a $DEFAULT_ALGORITHM -b $DEFAULT_BITS"
 else
     alg=""
+    quiet=1
+    args="-q"
 fi
 
-prog=$0
-args=""
-quiet=0
-msg="cryptography"
 while test "$#" -gt 0; do
     case $1 in
     -q)
-        args="$args -q"
-        quiet=1
+        if test $quiet -eq 0; then
+            args="$args -q"
+            quiet=1
+        fi
         ;;
     rsa|RSA|rsasha1|RSASHA1)
         alg="-a RSASHA1"