Commit 11eb116f authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Add scripts

parent aa35f3c1
#!/bin/sh
echo "Add pcspkr module to /etc/modules so it is loaded on startup"
LINE='pcspkr'
FILE=/etc/modules
grep -qF -- "$LINE" "$FILE" || echo "$LINE" | sudo tee -a "$FILE" > /dev/null
sudo modprobe pcspkr
\ No newline at end of file
#!/bin/sh
echo "Add udev rule so 0403:6001 devices do not load ftdi_sio driver"
LINE1='ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE:="0666"'
LINE2=$'ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", RUN+="/bin/sh -c \'echo $kernel > /sys/bus/usb/drivers/ftdi_sio/unbind\'"'
FILE=/etc/udev/rules.d/99-ftdi.rules
sudo touch $FILE
grep -qF -- "$LINE1" "$FILE" || echo "$LINE1" | sudo tee -a "$FILE" > /dev/null
grep -qF -- "$LINE2" "$FILE" || echo "$LINE2" | sudo tee -a "$FILE" > /dev/null
sudo service udev restart
echo "Need to unplug-plug devices for changes to take effect"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment