fixed dialout function

tweaked vara setup script for more testing
This commit is contained in:
tb14
2022-11-05 16:25:38 -05:00
parent e0944cef26
commit cdb8a5b85b
2 changed files with 20 additions and 3 deletions
+19 -3
View File
@@ -477,14 +477,30 @@ echo "100% Complete"
function add_dialout() {
if [[ $PLAT = "Linuxmint" ]]; then
if $(id | grep dialout); then
echo "User already a member of Dialout"; return
else
CHK_DIALOUT=$(id -nG | grep dialout)
if [ -z "$CHK_DIALOUT" ]; then
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; }
else
echo "User already a member of dialout group."
fi
fi
MYUSER=$(whoami)
CHK_DIALOUT=$(id -nG | grep dialout)
CHK_TTY=$(id -nG | grep tty)
CHK_AUDIO=$(id -nG | grep audio)
if [ -z "$CHK_DIALOUT" ]; then
echo "Adding user to dialout group"
sudo usermod -a -G dialout $MYUSER ||
{ ERRCODE="Failed to add user to dialout group"; errors; }
else
echo "User already in dialout group"
fi
}