summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Santos <casantos@datacom.ind.br>2018-04-21 13:00:10 (GMT)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-22 21:38:27 (GMT)
commitf5b14df1104c66a12b1203620afcf9bcb4ff22c5 (patch)
tree67d5376272b000c6546df3d30602f938a5d23157
parent3e0d304d20b66d3ec3e0e471c06e521e447d4640 (diff)
downloadbuildroot-master.tar.gz
buildroot-master.tar.bz2
modem-manager: support a defaults file in the init scriptHEADmaster
Sometimes it is useful to pass some parameters to ModemManager when it starts (e.g. --log-level). Allow the user add a file with such flags in a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole startup script (e.g. by means of a rootfs overlay). Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Acked-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rwxr-xr-xpackage/modem-manager/S44modem-manager5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/modem-manager/S44modem-manager b/package/modem-manager/S44modem-manager
index a3f5003..416c1e2 100755
--- a/package/modem-manager/S44modem-manager
+++ b/package/modem-manager/S44modem-manager
@@ -3,13 +3,16 @@
# Starts ModemManager
#
+# Allow a few customizations from a config file
+test -r /etc/default/ModemManager && . /etc/default/ModemManager
+
PIDFILE=/var/run/ModemManager.pid
start() {
printf "Starting ModemManager: "
umask 077
start-stop-daemon -S -q -b -m -p $PIDFILE \
- --exec /usr/sbin/ModemManager
+ --exec /usr/sbin/ModemManager -- $MODEMMANAGER_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {