diff --git a/ChangeLog b/ChangeLog index 9cc358f..8a2545b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Easy-RSA 3 ChangeLog 3.0.9 (TBD) + * Warnings are no longer silenced by --batch (#523) * Improve packaging options (#510) * Introduce basic support for OpenSSL version 3 (#492) * Upgrade OpenSSL from 1.1.0j to 1.1.1m (#405, #407) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index e0f5fb7..ca6bc17 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -227,6 +227,9 @@ non-empty values to options are mandatory. General options: --batch : set automatic (no-prompts when possible) mode +--silent : Disable all Warnings and Notices +--sbatch : Combined --silent and --batch operating mode + --passin=ARG : set -passin ARG for openssl --passout=ARG : set -passout ARG for openssl --pki-dir=DIR : declares the PKI directory @@ -281,20 +284,18 @@ $1" 1>&2 # non-fatal warning output warn() { - [ ! "$EASYRSA_BATCH" ] && \ - print " -$1" 1>&2 + [ "$EASYRSA_SILENT" ] && return + print "* Warning: - return 0 +$1" 1>&2 } # => warn() # informational notices to stdout notice() { - [ ! "$EASYRSA_BATCH" ] && \ - print " + [ "$EASYRSA_SILENT" ] && return + [ "$EASYRSA_BATCH" ] && return + print " $1" - - return 0 } # => notice() # yes/no case-insensitive match (operates on stdin pipe) @@ -2816,6 +2817,13 @@ while :; do --batch) empty_ok=1 export EASYRSA_BATCH=1 ;; + --silent) + empty_ok=1 + export EASYRSA_SILENT=1 ;; + --silent-batch|--sbatch) + empty_ok=1 + export EASYRSA_SILENT=1 + export EASYRSA_BATCH=1 ;; --passin) export EASYRSA_PASSIN="$val";; --passout)