badge-buildroot/board/businesscard/rootfs_overlay/etc/init.d/S99flashdrive
2019-08-17 09:20:52 -05:00

15 lines
468 B
Bash
Executable file

#! /bin/sh
case "$1" in
start|"")
echo 1 > /sys/class/udc/musb-hdrc.1.auto/device/gadget/lun0/ro
echo /dev/ubiblock0_3 > /sys/class/udc/musb-hdrc.1.auto/device/gadget/lun0/file
;;
stop)
echo '' > /sys/class/udc/musb-hdrc.1.auto/device/gadget/lun0/file
;;
*)
echo "Usage: flashdrive {start|stop}" >&2
exit 1
;;
esac