#!/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 ] || [ "${USB_MODE}" = mtp ]; then /usr/bin/usbgadget start $USB_MODE fi fi