distribution/packages/jelos/autostart/081-usbgadget
Christophe Branchereau fb947a3414 Add scripts to start/autostart USB gadget (ecm for now)
Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
2023-11-25 11:57:26 +01:00

10 lines
324 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
if [ -r /storage/.cache/usbgadget/usbgadget.conf ] ; then
USB_MODE=$(cat /storage/.cache/usbgadget/usbgadget.conf | cut -d "=" -f2)
if [ "${USB_MODE}" = cdc ] ; then
/usr/bin/usbgadget start $USB_MODE
fi
fi