1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-26 19:17:07 +00:00

networkmanager: use a proper init script with depends

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4828 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Ross Burton
2008-07-04 14:14:21 +00:00
parent 56ff3a1efb
commit 670fd324bf
2 changed files with 20 additions and 6 deletions
@@ -0,0 +1,43 @@
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: NetworkManager
# Required-Start: $remote_fs dbus hal
# Required-Stop: $remote_fs dbus hal
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: network connection manager
# Description: Daemon for automatically switching network
# connections to the best available connection.
### END INIT INFO
. /etc/profile
case $1 in
'start')
echo -n "Starting NetworkManager daemon: NetworkManager"
/usr/sbin/NetworkManager
/usr/sbin/NetworkManagerDispatcher
/usr/sbin/wpa_supplicant -u &
echo "."
;;
'stop')
echo -n "Stopping NetworkManager daemon: NetworkManager"
kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2`
kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2`
kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2`
echo "."
;;
'restart')
$0 stop
$0 start
;;
*)
echo "Usage: $0 { start | stop | restart }"
;;
esac