1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
10 # Setup ModemManager service
12 # We will make sure that the rundir always exists, and we initially cleanup
13 # all interfaces flagging them as unavailable.
15 # The cached events processing will wait for MM to be available in DBus
16 # and will make sure all ports are re-notified to ModemManager every time
19 # All these commands need to be executed on every MM start, even after
20 # procd-triggered respawns, which is why this is wrapped in a startup
21 # wrapper script called '/usr/sbin/ModemManager-wrapper'.
23 .
/usr
/share
/ModemManager
/modemmanager.common
24 procd_open_instance
"service"
25 procd_set_param
command /usr
/sbin
/ModemManager-wrapper
26 procd_append_param
command --log-level="$LOG_LEVEL"
27 [ "$LOG_LEVEL" = "DEBUG" ] && procd_append_param
command --debug
28 procd_set_param respawn
"${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
29 procd_set_param pidfile
"${MODEMMANAGER_PID_FILE}"
31 procd_open_instance
"monitor"
32 procd_set_param
command /usr
/sbin
/ModemManager-monitor
33 procd_set_param respawn
"${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"