Skip to content

Commit

Permalink
update uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Aug 4, 2024
1 parent e2a9939 commit e944b22
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion usb_gadget/installer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ install() {
uninstall () {
chmod +x ./remove_usb_gadget && ./remove_usb_gadget
rm -rf /usr/bin/init_usb_gadget
sed -i '/dtoverlay=dwc2/d' /boot/config.txt

# Remove configuration from /boot/firmware/config.txt if it exists
if [ -f /boot/firmware/config.txt ]; then
# Breaking change of Raspbian from version of Bookworm
sed -i '/dtoverlay=dwc2/d' /boot/firmware/config.txt
else
sed -i '/dtoverlay=dwc2/d' /boot/config.txt
fi

sed -i '/dwc2/d' /etc/modules
sed -i '/libcomposite/d' /etc/modules
sed -i '/init_usb_gadget/d' /etc/rc.local
Expand Down

0 comments on commit e944b22

Please sign in to comment.