Fix password echo

This commit is contained in:
Richard Bonhomme 2018-12-16 18:16:48 +00:00 committed by GitHub
parent 96696bcc7b
commit 482c4b517f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,7 +298,7 @@ clean_temp() {
prog_exit() {
ESTAT=0
[ ! -z "$1" ] && ESTAT=$1
(set -o echo 2>/dev/null) || stty echo
(stty echo 2>/dev/null) || set -o echo
echo "" # just to get a clean line
exit "$ESTAT"
} # => prog_exit()
@ -463,9 +463,9 @@ Your newly created PKI dir is: $EASYRSA_PKI
hide_read_pass()
{
(set +o echo 2>/dev/null) || stty -echo
(stty -echo 2>/dev/null) || set +o echo
read -r "$@"
(set -o echo 2>/dev/null) || stty echo
(stty echo 2>/dev/null) || set -o echo
} # => hide_read_pass()
# build-ca backend: