mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-17 09:01:49 +00:00
testing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5bb1359676
commit
d889b76b72
15
.pct-helpers
15
.pct-helpers
@ -186,17 +186,22 @@ xread(){
|
||||
xreadpass(){
|
||||
local PASS1
|
||||
local PASS2
|
||||
read -sep "password (Enter to skip): " PASS1
|
||||
echo
|
||||
if [ $PASS1 ] ; then
|
||||
for attempt in 1 2 3 ; do
|
||||
read -sep "password (Enter to skip): " PASS1
|
||||
echo
|
||||
if [ -z $PASS1 ] ; then
|
||||
return
|
||||
fi
|
||||
read -sep "retype password: " PASS2
|
||||
echo
|
||||
if [[ $PASS1 != $PASS2 ]] ; then
|
||||
echo "ERR: passwords do not match."
|
||||
return 1
|
||||
continue
|
||||
fi
|
||||
eval ''$1'='${PASS1}''
|
||||
fi
|
||||
return
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user