26 lines
360 B
Bash
26 lines
360 B
Bash
|
#!/bin/bash
|
||
|
gname=rpikvm
|
||
|
|
||
|
cd /sys/kernel/config/usb_gadget/$gname
|
||
|
|
||
|
echo "Disable gadget"
|
||
|
echo "" > UDC
|
||
|
|
||
|
echo "Clean up configs"
|
||
|
rm configs/c.1/hid.usb0
|
||
|
rmdir configs/c.1/strings/0x409
|
||
|
rmdir configs/c.1
|
||
|
|
||
|
echo "Clean up functions"
|
||
|
rmdir functions/hid.usb0
|
||
|
|
||
|
echo "Clean up strings"
|
||
|
rmdir strings/0x409
|
||
|
|
||
|
echo "Removing gadget"
|
||
|
cd ..
|
||
|
rmdir $gname
|
||
|
|
||
|
|
||
|
echo "All done"
|