-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gui/install.sh: update sudoers with vcgencmd #785
Conversation
Update /etc/sudoers.d/allsky if needed and possible. Added banner for updates. Move SCRIPTPATH up since it's needed higher in file now.
vcgencmd is in a different location in Bullseye vs Buster
works with Buster or Bullseye
gui/install.sh
Outdated
# Add entries to sudoers file if not already there. | ||
# This is only needed for people who updated allsky-portal but didn't update allsky. | ||
# Don't simply copy the "allsky" file to /etc/sudoers.d in case "allsky" isn't up to date. | ||
grep --silent "vcgencmd" /etc/sudoers.d/allsky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to grep -c
(count matches) and capture the response. Then in the conditional, ensure the response is 2, otherwise we need to update the sudoers file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just noticed we only add the /usr/bin
path now, not the opt
path...
So, we need to check here for the correct path instead of just the presence of vcgencmd
.
Update /etc/sudoers.d/allsky if needed and possible.
Added banner for updates.
Move SCRIPTPATH up since it's needed higher in file now.