libtool-cross 2.2.6[ab]: Drop legacy staging, taken from poky
[openembedded.git] / recipes / networkmanager / networkmanager-0.7 / NetworkManager
blob4cde8cc00319bc98476a724ad4827c1fe433a875
1 #! /bin/sh
3 # NetworkManager NetworkManager daemon
4 # Daemon for automatically switching network
5 # connections to the best available connection.
6 # This file should be placed in /etc/init.d.
8 # Authors: <j@bootlab.org>
9 # Mark Roach <mrroach@okmaybe.com>
10 # Thom May <thom@debian.org>
12 # Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
15 set -e
17 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
18 DESC="Network connection manager daemon"
19 NAME="NetworkManager"
20 DAEMON=/usr/sbin/$NAME
21 PIDFILE=/var/run/$NAME.pid
22 SCRIPTNAME=/etc/init.d/$NAME
23 USER=root
25 # Gracefully exit if the package has been removed.
26 test -x $DAEMON || exit 0
29 # Function that starts the daemon/service.
31 d_start() {
32 start-stop-daemon --start --quiet --pidfile $PIDFILE \
33 --user $USER --exec $DAEMON -- $DAEMON_OPTS
37 # Function that stops the daemon/service.
39 d_stop() {
40 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
41 --oknodo --user $USER --exec $DAEMON
45 case "$1" in
46 start)
47 echo -n "Starting $DESC: $NAME"
48 d_start
49 echo "."
51 stop)
52 echo -n "Stopping $DESC: $NAME"
53 d_stop
54 echo "."
56 restart|force-reload)
57 echo -n "Restarting $DESC: $NAME"
58 d_stop
59 sleep 1
60 d_start
61 echo "."
64 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
65 exit 1
67 esac
69 exit 0