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

post_install.sh: Use uaccess tag in udev rules #711

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions post_install.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env bash

arduino_mbed_rules () {
echo ""
echo "# Arduino Mbed bootloader mode udev rules"
echo ""
cat <<EOF
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0525", MODE:="0666"

# Arduino Mbed bootloader mode udev rules

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0525", TAG+="uaccess"
EOF
}

if [ "$EUID" -ne 0 ]
then echo "Please run as root"
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi

Expand Down