summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Santos <casantos@datacom.ind.br>2018-04-13 16:00:27 (GMT)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-15 19:57:01 (GMT)
commita86e44394a8bd94bb56fcead56cc196d6f90aa66 (patch)
tree07cd72aa2fec4c7cb3f541dbc26fdc7abdf7cfad
parent26184c2815072e2ab5ba6eb3e13542684d65c55a (diff)
downloadbuildroot-a86e44394a8bd94bb56fcead56cc196d6f90aa66.tar.gz
buildroot-a86e44394a8bd94bb56fcead56cc196d6f90aa66.tar.bz2
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>
-rwxr-xr-xpackage/network-manager/S45network-manager5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/network-manager/S45network-manager b/package/network-manager/S45network-manager
index f39e20d..bb4bf16 100755
--- a/package/network-manager/S45network-manager
+++ b/package/network-manager/S45network-manager
@@ -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!"