Fix issues adding Ubuntu users to dialout, root groups

the echo in the first half of 'if' had back-ticks causing execution instead of just text, but the whole statement isn't needed because re-adding the user to the group is a no-op, anyway.  space within the usermod command was causing it to fail also.
pull/177/head
unixpunk 2024-01-22 12:17:33 -06:00 zatwierdzone przez GitHub
rodzic 4d993d25ef
commit 524808c1b4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -35,13 +35,7 @@ sudo apt-get -y install swig avahi-daemon libavahi-client-dev python3-distutils
if grep -iq "NAME=\"Ubuntu\"" /etc/os-release; then
sudo apt-get install rpi.gpio-common
echo "Adding user `whoami` to dialout, root groups"
if [[ "`groups ``whoami`" == *`whoami`* ]]; then
echo "` User already in the group`"
else
sudo usermod -aG dialout, root "${USER}"
fi
sudo usermod -aG dialout,root "${USER}"
fi
sudo depmod -a