kumquat-buildroot/package/network-manager/S45network-manager
Matt Weber 590e9e05b6 packages: update sysv S* scripts to 644
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-08 11:35:22 +01:00

42 lines
751 B
Bash

#!/bin/sh
# Allow a few customizations from a config file
test -r /etc/default/NetworkManager && . /etc/default/NetworkManager
PID=`pidof NetworkManager`
case "$1" in
start)
printf "Starting NetworkManager ... "
[ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
if [ -z "$PID" ]; then
/usr/sbin/NetworkManager $NETWORKMANAGER_ARGS
fi
if [ ! -z "$PID" -o $? -gt 0 ]; then
echo "failed!"
else
echo "done."
fi
;;
stop)
printf "Stopping NetworkManager ... "
[ ! -z "$PID" ] && kill $PID > /dev/null 2>&1
if [ $? -gt 0 ]; then
echo "failed!"
else
echo "done."
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart|sleep|wake}"
;;
esac
exit 0