From 092b429d5d43f86e41ea40cb030213b01abc88c2 Mon Sep 17 00:00:00 2001 From: Tommaso Chiti Date: Fri, 27 May 2022 11:02:01 +0200 Subject: [PATCH] Fixing username issue. --- easy-arch.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index eaaeb72..1f3ad06 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -125,7 +125,7 @@ lukspass_selector () { return 1 fi echo - read -r -s -p "Insert the password for the LUKS container again: " 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 incEcho "Passwords don't match, please try again." @@ -136,7 +136,10 @@ lukspass_selector () { # Setting up a password for the user account (function). userpass_selector () { - read -r -s -p "Insert a user password for $username (you're not going to see it): " userpass + if [ -z "$username" ]; then + return 0 + fi + read -r -s -p "Insert a user password for $username (you're not going to see the password): " userpass if [ -z "$userpass" ]; then incEcho "\nYou need to enter a password for $username." return 1