networkmanager 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin networkmanager
  4. #
  5. # Description : NetworkManager Boot Script
  6. #
  7. # Authors : Armin K. <krejzi@email.com>
  8. #
  9. # Version : BLFS SVN
  10. #
  11. # Notes :
  12. #
  13. ########################################################################
  14. ### BEGIN INIT INFO
  15. # Provides: networkmanager
  16. # Required-Start: $remote_fs dbus udev
  17. # Required-Stop: $remote_fs dbus udev
  18. # Default-Start: 2 3 4 5
  19. # Default-Stop: 0 1 6
  20. # Short-Description: Network connection manager.
  21. # Description: Daemon for automatically switching network
  22. # connections to the best available connection.
  23. # X-LFS-Provided-By: BLFS
  24. ### END INIT INFO
  25. . /lib/lsb/init-functions
  26. case "${1}" in
  27. start)
  28. if [ ! -d /var/run/NetworkManager ]; then
  29. install -d -o root -g root -m 755 /var/run/NetworkManager
  30. fi
  31. log_info_msg "Starting network connection manager NetworkManager"
  32. start_daemon /usr/bin/NetworkManager
  33. evaluate_retval
  34. ;;
  35. stop)
  36. log_info_msg "Stopping network connection manager NetworkManager"
  37. killproc /usr/bin/NetworkManager
  38. evaluate_retval
  39. ;;
  40. restart)
  41. ${0} stop
  42. sleep 1
  43. ${0} start
  44. ;;
  45. status)
  46. statusproc /usr/bin/NetworkManager
  47. ;;
  48. *)
  49. echo "Usage: ${0} {start|stop|restart|status}"
  50. exit 1
  51. ;;
  52. esac
  53. exit 0
  54. # End networkmanager