From cb4401e0c04c0a0d3eb83f9621f1d6465eebe1f8 Mon Sep 17 00:00:00 2001 From: Tommaso Chiti Date: Sat, 28 May 2022 15:09:02 +0200 Subject: [PATCH] Cosmetics. --- easy-arch.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index 0331656..97807c0 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -117,9 +117,7 @@ lukspass_selector () { incEcho "You need to enter a password for the LUKS Container in order to continue." return 1 fi - echo 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 incEcho "Passwords don't match, please try again." return 1 @@ -129,6 +127,7 @@ lukspass_selector () { # Setting up a password for the user account (function). userpass_selector () { + read -r -p "Please enter name for a user account (enter empty to not create one): " username if [[ -z "$username" ]]; then return 0 fi @@ -203,14 +202,14 @@ locale_selector () { # User chooses the console keyboard layout (function). 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 - case $kblayout in + case "$kblayout" in '') kblayout="us" print "The standard US keyboard layout will be used." return 0;; '/') localectl list-keymaps clear 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." return 1 fi @@ -260,8 +259,7 @@ until locale_selector; do : ; done # User choses the hostname. until hostname_selector; do : ; done -# User chooses username. -read -r -p "Please enter name for a user account (enter empty to not create one): " username +# User sets up the user/root passwords. until userpass_selector; do : ; done until rootpass_selector; do : ; done