pmaports/modem/rmtfs/rmtfs.initd
Minecrell 99c95f57d2
modem/rmtfs: upgrade to 0.2_git20210408, start before oFono/MM (MR 2251)
At the moment, oFono/MM are usually stopped after rmtfs on shutdown.
This does not make sense, since the modem managed by oFono/MM will
disappear once rmtfs is stopped. Add a "before ofono modemmanager"
to make sure that OpenRC will stop oFono/MM before rmtfs on shutdown.

This may or may not fix some occasional hangs during shutdown,
but it definitely makes it possible for oFono/MM to shutdown cleanly.
2021-06-16 01:11:25 +03:00

28 lines
734 B
Text

#!/sbin/openrc-run
supervisor=supervise-daemon
name="RMTFS"
description="Qualcomm remote file system service"
# -P: find and use raw EFS partitions
# -r: avoid writing to storage
command="/usr/sbin/rmtfs"
command_args="-P -r"
# https://github.com/andersson/rmtfs/commit/dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1
respawn_delay=1
# Downstream hacks: use libqipcrtr4msmipc.so
if [ -f /usr/lib/preload/libqipcrtr4msmipc.so ]; then
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
else
# -s: enable sync for the mss rproc instance (works only on mainline)
# Basically: start/stop modem remoteproc together with rmtfs
command_args="$command_args -s"
fi
depend() {
before ofono modemmanager
after udev-settle
use qrtr-ns
}