Commit 4ed8fc37 authored by Strit's avatar Strit

added confirm password prompts

parent 0c472d5a
...@@ -14,6 +14,8 @@ DEVICE="" ...@@ -14,6 +14,8 @@ DEVICE=""
EDITION="" EDITION=""
USER="" USER=""
PASSWORD="" PASSWORD=""
CONFIRMPASSWORD=""
CONFIRMROOTPASSWORD=""
ROOTPASSWORD="" ROOTPASSWORD=""
SDCARD="" SDCARD=""
SDTYP="" SDTYP=""
...@@ -411,9 +413,24 @@ else ...@@ -411,9 +413,24 @@ else
exit 1 exit 1
fi fi
if [ ! -z "$PASSWORD" ]
then
CONFIRMPASSWORD=$(dialog --clear --title "Manjaro ARM Installer" \
--insecure --passwordbox "Confirm Password for $USER:" 8 50 \
3>&1 1>&2 2>&3 3>&- \
)
else
clear
exit 1
fi
if [[ "$PASSWORD" != "$CONFIRMPASSWORD" ]]; then
clear
msg "User passwords do not match! Please restart the installer and try again."
exit 1
fi
if [ ! -z "$PASSWORD" ] if [ ! -z "$CONFIRMPASSWORD" ]
then then
ROOTPASSWORD=$(dialog --clear --title "Manjaro ARM Installer" \ ROOTPASSWORD=$(dialog --clear --title "Manjaro ARM Installer" \
--insecure --passwordbox "Enter Root Password:" 8 50 \ --insecure --passwordbox "Enter Root Password:" 8 50 \
...@@ -424,10 +441,24 @@ else ...@@ -424,10 +441,24 @@ else
exit 1 exit 1
fi fi
if [ ! -z "$ROOTPASSWORD" ]
then
CONFIRMROOTPASSWORD=$(dialog --clear --title "Manjaro ARM Installer" \
--insecure --passwordbox "Confirm Root Password:" 8 50 \
3>&1 1>&2 2>&3 3>&- \
)
else
clear
exit 1
fi
if [[ "$ROOTPASSWORD" != "$CONFIRMROOTPASSWORD" ]]; then
clear
msg "Root passwords do not match! Please restart the installer and try again."
exit 1
fi
if [ ! -z "$CONFIRMROOTPASSWORD" ]
if [ ! -z "$ROOTPASSWORD" ]
then then
# simple command to put the results of lsblk (just the names of the devices) into an array and make that array populate the options # simple command to put the results of lsblk (just the names of the devices) into an array and make that array populate the options
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment