network-manager: support a defaults file in the init script
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>
This commit is contained in:
parent
26184c2815
commit
a86e44394a
@ -1,5 +1,8 @@
|
||||
#!/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
|
||||
@ -14,7 +17,7 @@ case "$1" in
|
||||
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!"
|
||||
|
Loading…
Reference in New Issue
Block a user