diff --git a/Scripts/gadget.sh b/Scripts/gadget.sh index 490c1ef..b256b35 100755 --- a/Scripts/gadget.sh +++ b/Scripts/gadget.sh @@ -12,17 +12,19 @@ fi # Is the dwc2 overlay installed? Nothing will work if it isn't. if lsmod | grep -q "dwc2"; then - systemd-cat -t gadget.sh -p info echo "DWC2 module loaded, setting up OTG gadget serial and ethernet" + echo "DWC2 module loaded, setting up OTG gadget serial and ethernet" | logger -t $0 -p info + echo "DWC2 module loaded" else - systemd-cat -t gadget.sh -p warning echo "DWC2 module missing. Aborting OTG setup." + echo "DWC2 module missing. Aborting OTG setup." | logger -t $0 -p info + echo "DWC2 module missing" systemctl disable serial-getty@ttyGS0.service exit 1 fi -sudo modprobe libcomposite +modprobe libcomposite cd /sys/kernel/config/usb_gadget if [ -d "MyGadget" ]; then - systemd-cat -t gadget.sh -p warning echo "MyGadget already exists. Aborting OTG setup." + echo "MyGadget already exists. Aborting OTG setup." | logger -t $0 -p info exit 1 fi