Check password by entering it twice and comparing
This commit is contained in:
parent
5721dbc578
commit
f7cd4cf166
16
startup.sh
16
startup.sh
|
|
@ -145,9 +145,19 @@ set_option DISK $option
|
||||||
userinfo () {
|
userinfo () {
|
||||||
read -p "Please enter your username: " username
|
read -p "Please enter your username: " username
|
||||||
set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
||||||
echo -ne "Please enter your password: \n"
|
while true; do
|
||||||
read -s password # read password without echo
|
echo -ne "Please enter your password: \n"
|
||||||
set_option PASSWORD $password
|
read -s password # read password without echo
|
||||||
|
set_option PASSWORD $password
|
||||||
|
|
||||||
|
echo -ne "Please repeat your password: \n"
|
||||||
|
read -s password2 # read password without echo
|
||||||
|
set_option PASSWORD2 $password2
|
||||||
|
|
||||||
|
[ "$password" = "$password2" ] && break
|
||||||
|
echo "Please try again"
|
||||||
|
done
|
||||||
|
|
||||||
read -rep "Please enter your hostname: " nameofmachine
|
read -rep "Please enter your hostname: " nameofmachine
|
||||||
set_option nameofmachine $nameofmachine
|
set_option nameofmachine $nameofmachine
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue