From c39532686ec9eb5bf52a7f8bf4de5cf50b215f9b Mon Sep 17 00:00:00 2001 From: tb14 Date: Wed, 19 Oct 2022 00:17:31 -0500 Subject: [PATCH] Added function to automatically check and add user to dialout group --- AmRRON-Setup-Script.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index e4335a5..242c646 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -462,7 +462,16 @@ echo "100% Complete" } +function add_dialout() { +if $(id | grep dialout); then +echo "User already a member of Dialout"; return +else +echo "Adding user to dialout group" +sudo usermod -a -G dialout $USER || +{ ERRCODE="Unable to add user to dialout group. You will need to run sudo usermod -a -G dialout $USER"; errors; return; } +fi +} #Deterimine computer type. @@ -4009,6 +4018,7 @@ exit 1 set_screen_size check_installed_programs query_updates +add_dialout primer_menu #notify_sources_menu system_update_menu