-
Notifications
You must be signed in to change notification settings - Fork 3
/
install-udev.sh
executable file
·25 lines (21 loc) · 1.07 KB
/
install-udev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
touch /tmp/65-inivation.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="152a", ATTR{idProduct}=="84[0-1]?", MODE="0666"
' >> /tmp/65-inivation.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6014", MODE="0666"' >> /tmp/65-inivation.rules
touch /tmp/66-inivation_devel.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1134", ATTR{idProduct}=="8001", MODE="0666"
' >> /tmp/66-inivation_devel.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="8613", MODE="0666"
' >> /tmp/66-inivation_devel.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="0053", MODE="0666"
' >> /tmp/66-inivation_devel.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="00f3", MODE="0666"' >> /tmp/66-inivation_devel.rules
# copied from https://gitlab.com/inivation/libcaer
echo "Copying udev rule (needs root privileges)."
sudo cp /tmp/65-inivation.rules /etc/udev/rules.d/
sudo cp /tmp/66-inivation_devel.rules /etc/udev/rules.d/
echo "Reloading udev rules."
sudo udevadm control --reload-rules
sudo udevadm trigger
echo "Done!"