Cosmetics.

This commit is contained in:
Tommaso Chiti 2022-05-28 15:09:02 +02:00
parent 13e0a61e5f
commit cb4401e0c0

View file

@ -117,9 +117,7 @@ lukspass_selector () {
incEcho "You need to enter a password for the LUKS Container in order to continue." incEcho "You need to enter a password for the LUKS Container in order to continue."
return 1 return 1
fi fi
echo
read -r -s -p "Insert the password for the LUKS container again (you're not going to see the password): " password2 read -r -s -p "Insert the password for the LUKS container again (you're not going to see the password): " password2
echo
if [[ "$password" != "$password2" ]]; then if [[ "$password" != "$password2" ]]; then
incEcho "Passwords don't match, please try again." incEcho "Passwords don't match, please try again."
return 1 return 1
@ -129,6 +127,7 @@ lukspass_selector () {
# Setting up a password for the user account (function). # Setting up a password for the user account (function).
userpass_selector () { userpass_selector () {
read -r -p "Please enter name for a user account (enter empty to not create one): " username
if [[ -z "$username" ]]; then if [[ -z "$username" ]]; then
return 0 return 0
fi fi
@ -203,14 +202,14 @@ locale_selector () {
# User chooses the console keyboard layout (function). # User chooses the console keyboard layout (function).
keyboard_selector () { keyboard_selector () {
read -r -p "Please insert the keyboard layout to use in console (enter empty to use US, or \"/\" to look up for keyboard layouts): " kblayout read -r -p "Please insert the keyboard layout to use in console (enter empty to use US, or \"/\" to look up for keyboard layouts): " kblayout
case $kblayout in case "$kblayout" in
'') kblayout="us" '') kblayout="us"
print "The standard US keyboard layout will be used." print "The standard US keyboard layout will be used."
return 0;; return 0;;
'/') localectl list-keymaps '/') localectl list-keymaps
clear clear
return 1;; return 1;;
*) if ! localectl list-keymaps | grep -Fxq $kblayout; then *) if ! localectl list-keymaps | grep -Fxq "$kblayout"; then
incEcho "The specified keymap doesn't exist." incEcho "The specified keymap doesn't exist."
return 1 return 1
fi fi
@ -260,8 +259,7 @@ until locale_selector; do : ; done
# User choses the hostname. # User choses the hostname.
until hostname_selector; do : ; done until hostname_selector; do : ; done
# User chooses username. # User sets up the user/root passwords.
read -r -p "Please enter name for a user account (enter empty to not create one): " username
until userpass_selector; do : ; done until userpass_selector; do : ; done
until rootpass_selector; do : ; done until rootpass_selector; do : ; done