Check for GADGET_MODE in boot/firmware to enable
This commit is contained in:
@@ -9,6 +9,13 @@ if [ $(id -u) -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f /boot/firmware/GADGET_MODE ]; then
|
||||
systemd-cat -t gadget.sh -p info echo "/boot/firmware/GADGET_MODE exists: GADGET mode enabled"
|
||||
else
|
||||
systemd-cat -t gadget.sh -p warning echo "/boot/firmware/GADGET_MODE missing: GADGET mode disabled"
|
||||
systemctl disable serial-getty@ttyGS0.service
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Is the dwc2 overlay installed? Nothing will work if it isn't.
|
||||
if [ -d /sys/class/udc ] && [ -n "$(ls -A /sys/class/udc)" ]; then
|
||||
|
||||
Reference in New Issue
Block a user