Improve hide_read_pass function

Follow example from prog_exit function
This commit is contained in:
Richard Bonhomme 2018-10-02 18:52:05 +01:00 committed by GitHub
parent abbae14592
commit e1e3ce8860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,9 +446,9 @@ Your newly created PKI dir is: $EASYRSA_PKI
hide_read_pass()
{
(set +o echo 2>/dev/null) && set +o echo || stty -echo
(set +o echo 2>/dev/null) || stty -echo
read -r "$@"
(set -o echo 2>/dev/null) && set -o echo || stty echo
(set -o echo 2>/dev/null) || stty echo
} # => hide_read_pass()
# build-ca backend: