board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / network-manager / S45network-manager
blobf39e20d73b7391cd12e87e4190727acc217125ce
1 #!/bin/sh
3 prefix=/usr
4 exec_prefix=/usr
5 sbindir=${exec_prefix}/sbin
7 NETWORKMANAGER_BIN=${sbindir}/NetworkManager
9 [ -x $NETWORKMANAGER_BIN ] || exit 0
11 PID=`pidof NetworkManager`
12 case "$1" in
13 start)
14 printf "Starting NetworkManager ... "
15 [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
16 if [ -z "$PID" ]; then
17 $NETWORKMANAGER_BIN
19 if [ ! -z "$PID" -o $? -gt 0 ]; then
20 echo "failed!"
21 else
22 echo "done."
25 stop)
26 printf "Stopping NetworkManager ... "
27 [ ! -z "$PID" ] && kill $PID > /dev/null 2>&1
28 if [ $? -gt 0 ]; then
29 echo "failed!"
30 else
31 echo "done."
34 restart)
35 $0 stop
36 sleep 1
37 $0 start
40 echo "usage: $0 {start|stop|restart|sleep|wake}"
42 esac
43 exit 0