Skip to content
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

Merged
merged 5 commits into from
Nov 16, 2021

Conversation

EricClaeys
Copy link
Collaborator

Update /etc/sudoers.d/allsky if needed and possible.
Added banner for updates.
Move SCRIPTPATH up since it's needed higher in file now.

Update /etc/sudoers.d/allsky if needed and possible.
Added banner for updates.
Move SCRIPTPATH up since it's needed higher in file now.
@EricClaeys EricClaeys added bug Needs software change config labels Nov 12, 2021
gui/install.sh Outdated Show resolved Hide resolved
@EricClaeys EricClaeys requested a review from ckuethe November 14, 2021 03:59
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
Copy link
Collaborator

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.

Copy link
Collaborator

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.

@EricClaeys EricClaeys requested a review from linuxkidd November 16, 2021 20:39
@linuxkidd linuxkidd merged commit e6647cc into master Nov 16, 2021
@EricClaeys EricClaeys deleted the gui-install-sudoers-update branch November 17, 2021 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs software change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants