allow numbers in username, except for first character
This commit is contained in:
parent
04b8d67bba
commit
5a8f9bf9a2
|
|
@ -394,9 +394,9 @@ fi
|
|||
if [ ! -z "$EDITION" ]; then
|
||||
USER=$(dialog --clear --title "Manjaro ARM Installer" \
|
||||
--inputbox "Enter the username you want:
|
||||
(usernames most be all lowercase)" 8 50 \
|
||||
(usernames must be all lowercase and first character may not be a number)" 8 50 \
|
||||
3>&1 1>&2 2>&3 3>&-)
|
||||
if [[ "$USER" =~ [A-Z] ]] || [[ "$USER" =~ [0-9] ]] || [[ "$USER" == *['!'@#\$%^\&*()_+]* ]]; then
|
||||
if [[ "$USER" =~ [A-Z] ]] || [[ "$USER" =~ ^[0-9] ]] || [[ "$USER" == *['!'@#\$%^\&*()_+]* ]]; then
|
||||
clear
|
||||
msg "Configuration aborted! Username contained invalid characters."
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue