Add helpful Warnings to promote preferred use of PKI/vars

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-12 18:35:47 +01:00
parent 17ebec2a3e
commit 6e2d139177
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -2136,10 +2136,11 @@ Sourcing the vars file will probably fail ..
# shellcheck disable=1090 # can't follow non-constant source. vars
. "$vars"
notice "Note: using Easy-RSA configuration from: $vars"
[ "$vars_in_pki" ] || \
warn "Move your vars file to your PKI folder, where it is safe!"
else
# $vars remains undefined .. no vars found
# Warning already issued!
: # ok
warn "No vars file found! Please create one in your PKI folder."
fi
else
# EASYRSA_NO_VARS is defined or want_init_pki, no vars is required.