Skip to content

Commit

Permalink
Move create_dfu_udev_rule from loader to core
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm authored and SidLeung committed Mar 29, 2017
1 parent 07ac10a commit bf9c569
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/create_dfu_udev_rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#

if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root"
exit
fi

NAME=99-arduino-101.rules

echo >/etc/udev/rules.d/$NAME
echo \# Arduino 101 in DFU Mode >>/etc/udev/rules.d/$NAME
echo SUBSYSTEM==\"tty\", ENV{ID_REVISION}==\"8087\", ENV{ID_MODEL_ID}==\"0ab6\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_CANDIDATE}=\"0\" >>/etc/udev/rules.d/$NAME
echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", ATTR{idProduct}==\"0aba\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\" >>/etc/udev/rules.d/$NAME

udevadm control --reload-rules
udevadm trigger

0 comments on commit bf9c569

Please sign in to comment.