35 lines
607 B
Bash
Executable File
35 lines
607 B
Bash
Executable File
#!/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.kbd0
|
|
rm configs/c.1/hid.mouse0
|
|
rm configs/c.1/hid.mouse1
|
|
rm configs/c.1/mass_storage.disk1
|
|
rm configs/c.1/mass_storage.cdrom1
|
|
|
|
rmdir configs/c.1/strings/0x409
|
|
rmdir configs/c.1
|
|
|
|
echo "Clean up functions"
|
|
rmdir functions/hid.kbd0
|
|
rmdir functions/hid.mouse0
|
|
rmdir functions/hid.mouse1
|
|
rmdir functions/mass_storage.disk1
|
|
rmdir functions/mass_storage.cdrom1
|
|
|
|
echo "Clean up strings"
|
|
rmdir strings/0x409
|
|
|
|
echo "Removing gadget"
|
|
cd ..
|
|
rmdir $gname
|
|
|
|
|
|
echo "All done"
|