mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-17 17:11:47 +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(){
|
xreadpass(){
|
||||||
local PASS1
|
local PASS1
|
||||||
local PASS2
|
local PASS2
|
||||||
read -sep "password (Enter to skip): " PASS1
|
for attempt in 1 2 3 ; do
|
||||||
echo
|
read -sep "password (Enter to skip): " PASS1
|
||||||
if [ $PASS1 ] ; then
|
echo
|
||||||
|
if [ -z $PASS1 ] ; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
read -sep "retype password: " PASS2
|
read -sep "retype password: " PASS2
|
||||||
echo
|
echo
|
||||||
if [[ $PASS1 != $PASS2 ]] ; then
|
if [[ $PASS1 != $PASS2 ]] ; then
|
||||||
echo "ERR: passwords do not match."
|
echo "ERR: passwords do not match."
|
||||||
return 1
|
continue
|
||||||
fi
|
fi
|
||||||
eval ''$1'='${PASS1}''
|
eval ''$1'='${PASS1}''
|
||||||
fi
|
return
|
||||||
|
done
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user