Sometimes it is useful to pass some parameters to NetworkManager when it
starts (e.g. --log-level) instead of editting NetworkManager.conf. Allow
the user add a file with a NETWORKMANAGER_ARGS variable containing such
flags. 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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
#!/bin/sh
+# Allow a few customizations from a config file
+test -r /etc/default/NetworkManager && . /etc/default/NetworkManager
+
prefix=/usr
exec_prefix=/usr
sbindir=${exec_prefix}/sbin
printf "Starting NetworkManager ... "
[ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
if [ -z "$PID" ]; then
- $NETWORKMANAGER_BIN
+ $NETWORKMANAGER_BIN $NETWORKMANAGER_ARGS
fi
if [ ! -z "$PID" -o $? -gt 0 ]; then
echo "failed!"