Skip to content

Commit

Permalink
Update udev rules file
Browse files Browse the repository at this point in the history
Rules always start with a prioity number. Also use the project name so
that we know where this rule came from.

Also add TAG+="uaccess" and a newline to the end of the file (some
versions of udev won't handle file well if there are missing the
final newline).
  • Loading branch information
dlech authored and a3f committed Apr 19, 2019
1 parent 78a9a4e commit 655dd2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ev3-udev.rules → 99-ev3duder.rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBSYSTEM=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666", TAG+="uaccess"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666", TAG+="uaccess"

KERNEL=="hidraw*", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666"
KERNEL=="hidraw*", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666", TAG+="uaccess"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ cross: $(BIN_NAME)

ifneq ($(OS),Windows_NT)
.PHONY: install
install: $(BIN_NAME) ev3-udev.rules udev.sh
install: $(BIN_NAME) 99-ev3duder.rules udev.sh
-@mkdir /usr/lib/ev3duder/
cp $(BIN_NAME) /usr/lib/ev3duder
ln -s /usr/lib/ev3duder/$(BIN_NAME) /usr/bin/ev3
Expand Down
2 changes: 1 addition & 1 deletion udev.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# too clever for its own good..
#eval "./ev3duder test 2>/dev/null | head -1 > /etc/udev/rules.d"
sudo cp ev3-udev.rules /etc/udev/rules.d/ev3.rules
sudo cp 99-ev3duder.rules /etc/udev/rules.d/

sudo udevadm control --reload-rules
sudo udevadm trigger

0 comments on commit 655dd2f

Please sign in to comment.