Only assign a value to $vars if a 'vars' file is found

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-06 22:59:23 +01:00
parent 57487a3406
commit 223237ab7f
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -2074,10 +2074,11 @@ Priority should be given to your PKI vars file:
"
esac
# Assign vars in order of preference.
for i in "$pki_vars" "$prog_vars" "$easy_vars" "$pwd_vars"; do
vars="${vars:-"$i"}"
done
# If a vars file is found then assign $vars
[ "$f_pki_vars" ] && vars="$pki_vars"
[ "$f_prog_vars" ] && vars="$prog_vars"
[ "$f_easy_vars" ] && vars="$easy_vars"
[ "$f_pwd_vars" ] && vars="$pwd_vars"
fi
# If $EASYRSA_NO_VARS is defined (not blank) then do not use vars