Only warn if 'vars' is in PKI

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-11 23:32:17 +01:00
parent 4c4efbd6ae
commit de7735115c
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -2118,7 +2118,9 @@ Priority should be given to your PKI vars file:
[ "$pwd_vars" ] && vars="$pwd_vars" [ "$pwd_vars" ] && vars="$pwd_vars"
[ "$easy_vars" ] && vars="$easy_vars" [ "$easy_vars" ] && vars="$easy_vars"
[ "$prog_vars" ] && vars="$prog_vars" [ "$prog_vars" ] && vars="$prog_vars"
[ "$pki_vars" ] && vars="$pki_vars" # Prioritise vars_in_pki
unset -v vars_in_pki && \
[ "$pki_vars" ] && vars="$pki_vars" && vars_in_pki=1
fi fi
# If $EASYRSA_NO_VARS is defined (not blank) then do not use vars # If $EASYRSA_NO_VARS is defined (not blank) then do not use vars
@ -2134,7 +2136,7 @@ file. Storing sensitive information in the configuration file is not
recommended - please remove it from there before continuing. recommended - please remove it from there before continuing.
" "
fi fi
if grep -q "'" "$vars"; then if [ "$vars_in_pki" ] && grep -q "'" "$vars"; then
warn " warn "
Single quote (') has been found in the configuration file. Single quote (') has been found in the configuration file.
This character is not supported in the configuration file. This character is not supported in the configuration file.