Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7673>
21 lines
318 B
Plaintext
21 lines
318 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
name=usb-moded
|
|
description="usb-moded USB gadget controller"
|
|
command="/usr/sbin/usb_moded"
|
|
command_background=yes
|
|
|
|
depend() {
|
|
need dbus
|
|
}
|
|
|
|
start_pre() {
|
|
mkdir -p "$configfs"
|
|
mount -t configfs none "$configfs"
|
|
}
|
|
|
|
stop_post() {
|
|
umount "$configfs"
|
|
rmdir "$configfs"
|
|
}
|