From fd7c481051fcb88e1062648953bbe00fbbbe5099 Mon Sep 17 00:00:00 2001 From: SolidHal Date: Wed, 10 Oct 2018 15:09:02 -0500 Subject: [PATCH] Username entry is now safe and tested. Add missing grf handles. Fixes small dmesg error --- ...006-ARM-DTSI-rk3288-Missing-GRF-handles.patch | 0 scripts/InstallScripts/InstallPackages.sh | 16 +++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) rename resources/BuildResources/{patches-untested => patches-tested}/DTS/0006-ARM-DTSI-rk3288-Missing-GRF-handles.patch (100%) diff --git a/resources/BuildResources/patches-untested/DTS/0006-ARM-DTSI-rk3288-Missing-GRF-handles.patch b/resources/BuildResources/patches-tested/DTS/0006-ARM-DTSI-rk3288-Missing-GRF-handles.patch similarity index 100% rename from resources/BuildResources/patches-untested/DTS/0006-ARM-DTSI-rk3288-Missing-GRF-handles.patch rename to resources/BuildResources/patches-tested/DTS/0006-ARM-DTSI-rk3288-Missing-GRF-handles.patch diff --git a/scripts/InstallScripts/InstallPackages.sh b/scripts/InstallScripts/InstallPackages.sh index ce83d14..bedf3dd 100755 --- a/scripts/InstallScripts/InstallPackages.sh +++ b/scripts/InstallScripts/InstallPackages.sh @@ -95,19 +95,21 @@ dmesg -D #Force a safe username while true; do + echo " Enter new username: " + read username + #ensure no whitespace + case $username in *\ *) echo usernames may not contain whitespace;; *) break;; esac +done +until adduser $username --gecos "" +do while true; do echo " Enter new username: " read username #ensure no whitespace case $username in *\ *) echo usernames may not contain whitespace;; *) break;; esac - case $username in "") echo Username cannot be blank;; break;; esac - done -adduser $username --gecos "" -retVal=$? -if [ $retVal == 0 ]; then - break -fi + done done + usermod -a -G sudo,netdev,input,video $username dmesg -E