#!/bin/sh
#
# NetworkManager startup script

. /etc/profile

case $1 in
  'start')
    echo -n "Starting NetworkManager daemon: NetworkManager"
    /usr/sbin/NetworkManager 
    /usr/sbin/NetworkManagerDispatcher
    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`
    echo "."
  ;;

  'restart')
    $0 stop
    $0 start
  ;;

  *)
    echo "Usage: $0 { start | stop | restart }"
  ;;
esac
