Added function to automatically check and add user to dialout group

This commit is contained in:
tb14
2022-10-19 00:17:31 -05:00
parent a830a15723
commit c39532686e
+10
View File
@@ -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