dbus 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin dbus
  4. #
  5. # Description : Start dbus daemon
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.0
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: dbus
  14. # Required-Start: cleanfs
  15. # Should-Start: $remote_fs
  16. # Required-Stop: sendsignals
  17. # Should-Stop:
  18. # Default-Start: 2 3 4 5
  19. # Default-Stop: 0 1 6
  20. # Short-Description: Starts message bus.
  21. # Description: Starts message bus.
  22. # X-LFS-Provided-By: LFS
  23. ### END INIT INFO
  24. . /lib/lsb/init-functions
  25. #$LastChangedBy: bdubbs $
  26. #$Date: 2012-05-02 15:39:55 -0500 (Wed, 02 May 2012) $
  27. pidfile=/run/dbus/pid
  28. socket=/run/dbus/system_bus_socket
  29. case "$1" in
  30. start)
  31. log_info_msg "Starting the D-Bus Messagebus Daemon..."
  32. mkdir -p /run/dbus
  33. /usr/bin/dbus-uuidgen --ensure
  34. start_daemon /usr/bin/dbus-daemon --system
  35. evaluate_retval
  36. ;;
  37. stop)
  38. log_info_msg "Stopping the D-Bus Messagebus Daemon..."
  39. killproc /usr/bin/dbus-daemon
  40. evaluate_retval
  41. rm -f $socket $pidfile
  42. ;;
  43. restart)
  44. $0 stop
  45. sleep 1
  46. $0 start
  47. ;;
  48. status)
  49. statusproc /usr/bin/dbus-daemon
  50. ;;
  51. *)
  52. echo "Usage: $0 {start|stop|restart|status}"
  53. exit 1
  54. ;;
  55. esac
  56. # End /etc/init.d/dbus