-
-
Notifications
You must be signed in to change notification settings - Fork 40
feat: install udev rules for UNO Q #240
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
base: main
Are you sure you want to change the base?
Conversation
| if [ "$EUID" -ne 0 ]; then | ||
| if [ -e "${PWD}/post_install.sh" ]; then | ||
| if command -v pkexec > /dev/null 2>&1; then | ||
| echo "Requesting root privileges via $PKEXEC..." |
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.
| echo "Requesting root privileges via $PKEXEC..." | |
| echo "Requesting root privileges..." |
The PKEXEC variable is not defined by the script, and at least on my Ubuntu machine, not defined globally. So the previous command would output:
Requesting root privileges via ...
I don't see any need to surface to the user the exact tool that is being used to request the privileges, so I think the best approach is to reword it as in my suggestion above.
| # Arduino UNO Q | ||
| SUBSYSTEM=="usb", ATTR{idVendor}=="2341", ATTR{idProduct}=="0078", MODE="0666" |
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.
| # Arduino UNO Q | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="2341", ATTR{idProduct}=="0078", MODE="0666" | |
| # Arduino UNO Q | |
| # Operating mode | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="2341", ATTR{idProduct}=="0078", MODE="0666" | |
| # EDL mode | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9008", MODE="0666" |
Even though it is not required for the specific use case of uploading a sketch to the board, I think it is worth also adding a rule for the "EDL mode" we put the board in when flashing the Linux operating system image to the board.
Add a post-installation script for adding udev rules for UNO Q