pmaports/modem/rmtfs/rmtfs.initd
Minecrell dcd3ae8f07
modem/rmtfs: upgrade to 0.2_git20210809, start before networkmanager (MR 3269)
Also include z3ntu's patch fixing a buffer overread issue which sadly
has not been merged for several months now.

rmtfs should be ideally started and stopped before NetworkManager
because otherwise the modem network interface might be removed before
NetworkManager can set it down. This has caused kernel issues at some
point (although it seems to be fine again at the moment).
2022-07-05 18:49:21 +02:00

28 lines
749 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 networkmanager ofono modemmanager
after udev-settle
use qrtr-ns
}