Merge branch 'TinCanTech-remove-opts-verbose-quiet'

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-11-30 21:40:36 +00:00
commit b6e73a45af
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246
2 changed files with 8 additions and 24 deletions

View File

@ -17,7 +17,6 @@ Easy-RSA 3 ChangeLog
* Always ensure X509-types files exist (#581 #696)
* Expand alias '--days' to all suitable options with a period (#674)
* Introduce --keep-tmp, keep temp files for debugging (#667)
* Introduce Option -q|--quiet, disable information output (#703)
* Add serialNumber (OID 2.5.4.5) to DN 'org' mode (#606)
* Support ampersand and dollar-sign in vars file (#590)
* Introduce 'rewind-renew' (#579)

View File

@ -457,7 +457,6 @@ General options:
--batch : Set automatic (no-prompts when possible) mode
--silent|-s : Disable all warnings, notices and information
--sbatch : Combined --silent and --batch operating mode
--quiet|-q : Quiet mode, disable information messages only
--no-pass : Do not use passwords
Can not be used with --passin or --passout
@ -548,29 +547,19 @@ $1
# informational notices to stdout
notice() {
[ "$EASYRSA_SILENT" ] && return
[ "$EASYRSA_BATCH" ] && return
print "
Notice
------
$1
"
$1"
} # => notice()
# Helpful information
information() {
[ "$EASYRSA_SILENT" ] && return
[ "$EASYRSA_BATCH" ] && return
[ "$EASYRSA_QUIET" ] && return
print "
* $1"
} # => information()
# Verbose status reports
verbose() {
[ "$EASYRSA_VERBOSE" ] || return 0
print "$1"
} # => verbose()
# intent confirmation helper func
# returns without prompting in EASYRSA_BATCH
confirm() {
@ -1074,7 +1063,8 @@ Your newly created PKI dir is:
if [ "$new_vars_true" ]; then
information "\
IMPORTANT: Easy-RSA 'vars' template file has been created in your new PKI.
Edit this 'vars' file to customise the settings for your PKI."
Edit this 'vars' file to customise the settings for your PKI.
To use a global vars file, use global option --vars=<YOUR_VARS>"
elif [ "$user_vars_true" ] || [ "$old_vars_true" ] || [ "$no_new_vars" ]
then
@ -3824,7 +3814,8 @@ expire_status() {
# db serial must match certificate serial, otherwise this
# is a renewed cert which has been replaced by an issued cert
if [ "$db_serial" != "$cert_serial" ]; then
verbose "* serial mismatch:
information "\
serial mismatch:
db_serial: $db_serial
cert_serial: $cert_serial
cert_issued: $cert_issued"
@ -3904,7 +3895,8 @@ renew_status() {
# db serial must match certificate serial, otherwise this
# is an issued cert that replaces a renewed cert
if [ "$db_serial" != "$cert_serial" ]; then
verbose "* serial mismatch:
information "\
serial mismatch:
db_serial: $db_serial
cert_serial: $cert_serial
cert_file_in: $cert_file_in"
@ -4060,8 +4052,8 @@ detect_host() {
# Extra diagnostics
show_host() {
[ "$EASYRSA_SILENT" ] && return
print_version
[ "$EASYRSA_VERBOSE" ] || return 0
print "$host_out"
[ "$EASYRSA_DEBUG" ] || return 0
case "$easyrsa_host_os" in
@ -5122,13 +5114,6 @@ while :; do
export EASYRSA_SILENT=1
export EASYRSA_BATCH=1
;;
-q|--quiet)
empty_ok=1
export EASYRSA_QUIET=1 ;;
-v|--verbose)
empty_ok=1
export EASYRSA_VERBOSE=1
;;
--nopass|--no-pass)
empty_ok=1
export EASYRSA_NO_PASS=1