From 524808c1b4b4b919a24995aa2e6f35b69bb1c47e Mon Sep 17 00:00:00 2001 From: unixpunk <30475586+unixpunk@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:17:33 -0600 Subject: [PATCH] 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. --- install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install.sh b/install.sh index dbe8947..047dd49 100755 --- a/install.sh +++ b/install.sh @@ -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