Add EasyRSA version to error output
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
00675e79da
commit
cfbfeaae53
@ -481,7 +481,7 @@ Easy-RSA error:
|
|||||||
$1" 1>&2
|
$1" 1>&2
|
||||||
|
|
||||||
print "
|
print "
|
||||||
Host: $host_out${EASYRSA_DEBUG+
|
$host_out${EASYRSA_DEBUG+
|
||||||
*** Disable EASYRSA_DEBUG mode ***}"
|
*** Disable EASYRSA_DEBUG mode ***}"
|
||||||
|
|
||||||
exit "${2:-1}"
|
exit "${2:-1}"
|
||||||
@ -3226,7 +3226,8 @@ satisfy_shellcheck() {
|
|||||||
|
|
||||||
# Identify host OS
|
# Identify host OS
|
||||||
detect_host() {
|
detect_host() {
|
||||||
unset -v easyrsa_host_os easyrsa_host_test easyrsa_win_git_bash
|
unset -v easyrsa_ver_test easyrsa_host_os easyrsa_host_test \
|
||||||
|
easyrsa_win_git_bash
|
||||||
|
|
||||||
# Detect Windows
|
# Detect Windows
|
||||||
[ "${OS}" ] && easyrsa_host_test="${OS}"
|
[ "${OS}" ] && easyrsa_host_test="${OS}"
|
||||||
@ -3251,11 +3252,19 @@ detect_host() {
|
|||||||
else
|
else
|
||||||
easyrsa_host_os=nix
|
easyrsa_host_os=nix
|
||||||
easyrsa_uname="$(uname 2>/dev/null)"
|
easyrsa_uname="$(uname 2>/dev/null)"
|
||||||
easyrsa_shell="$SHELL"
|
easyrsa_shell="${SHELL:-undefined}"
|
||||||
fi
|
fi
|
||||||
host_out="$easyrsa_host_os | $easyrsa_uname | $easyrsa_shell"
|
|
||||||
|
easyrsa_ver_test="${EASYRSA_version%%~*}"
|
||||||
|
if [ "$easyrsa_ver_test" ]; then
|
||||||
|
host_out="Version: $EASYRSA_version"
|
||||||
|
else
|
||||||
|
host_out="Version: dev"
|
||||||
|
fi
|
||||||
|
|
||||||
|
host_out="${host_out} | $easyrsa_host_os | $easyrsa_uname | $easyrsa_shell"
|
||||||
host_out="${host_out}${easyrsa_win_git_bash+ | "$easyrsa_win_git_bash"}"
|
host_out="${host_out}${easyrsa_win_git_bash+ | "$easyrsa_win_git_bash"}"
|
||||||
unset -v easyrsa_host_test
|
unset -v easyrsa_ver_test easyrsa_host_test
|
||||||
} # => detect_host()
|
} # => detect_host()
|
||||||
|
|
||||||
# Verify the selected algorithm parameters
|
# Verify the selected algorithm parameters
|
||||||
@ -4138,7 +4147,7 @@ print_version()
|
|||||||
ssl_version="$("${EASYRSA_OPENSSL:-openssl}" version)"
|
ssl_version="$("${EASYRSA_OPENSSL:-openssl}" version)"
|
||||||
cat << VERSION_TEXT
|
cat << VERSION_TEXT
|
||||||
EasyRSA Version Information
|
EasyRSA Version Information
|
||||||
Version: ~VER~
|
Version: $EASYRSA_version
|
||||||
Generated: ~DATE~
|
Generated: ~DATE~
|
||||||
SSL Lib: $ssl_version
|
SSL Lib: $ssl_version
|
||||||
Git Commit: ~GITHEAD~
|
Git Commit: ~GITHEAD~
|
||||||
@ -4150,6 +4159,7 @@ VERSION_TEXT
|
|||||||
########################################
|
########################################
|
||||||
# Invocation entry point:
|
# Invocation entry point:
|
||||||
|
|
||||||
|
EASYRSA_version="~VER~"
|
||||||
NL='
|
NL='
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user