From b5d6fbc1e2969e96b2f4b7d9cb1b83ec8f6a6d8f Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 28 Nov 2018 14:07:33 +0100 Subject: [PATCH] more detailed info --- home.admin/20initDialog.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/home.admin/20initDialog.sh b/home.admin/20initDialog.sh index 1be4919..5c231d7 100755 --- a/home.admin/20initDialog.sh +++ b/home.admin/20initDialog.sh @@ -11,7 +11,7 @@ while [ ${#result} -eq 0 ] l1="Please enter the name of your new RaspiBlitz:\n" l2="one word, keep characters basic & not too long" dialog --backtitle "RaspiBlitz - Setup" --inputbox "$l1$l2" 11 52 2>$_temp - result=$( cat $_temp | tr -d [:space:] ) + result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' ) shred $_temp done @@ -49,21 +49,10 @@ Write them down & store them in a safe place. shred $_temp passwordValid=1 - clearedResult=$(echo '${result}' | tr -dc '[:alnum:]-.' | tr -d ' ') - #echo "(${clearedResult}) (${#clearedResult} )" - #echo "(${result}) (${#result})" + clearedResult=$(echo "${result}" | tr -dc '[:alnum:]-.' | tr -d ' ') if [ ${#clearedResult} != ${#result} ]; then clear - echo "FAIL - Password contained not allowed chars" - echo "Press ENTER to continue .." - read key - passwordValid=0 - fi - - # check input (check for more later) - if [ ${#result} -eq 0 ]; then - clear - echo "FAIL - Password cannot be empty" + echo "FAIL - Password contained not allowed chars (see next screen)" echo "Press ENTER to continue .." read key passwordValid=0