acpid 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin acpid
  4. #
  5. # Description : ACPI event daemon boot script
  6. #
  7. # Author : Igor Živković <contact@igor-zivkovic.from.hr>
  8. #
  9. # Version : BLFS SVN
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: acpid
  14. # Required-Start: $remote_fs $syslog
  15. # Required-Stop: $remote_fs $syslog
  16. # Default-Start: 2 3 4 5
  17. # Default-Stop: 0 1 6
  18. # Short-Description: Starts Advanced Configuration and Power Interface event daemon
  19. # X-LFS-Provided-By: BLFS
  20. ### END INIT INFO
  21. . /etc/rc.d/functions
  22. #$LastChangedBy: igor $
  23. #$Date: 2013-07-10 17:04:20 -0500 (Wed, 10 Jul 2013) $
  24. case "$1" in
  25. start)
  26. log_info_msg "Starting ACPI event daemon..."
  27. start_daemon /usr/bin/acpid
  28. sleep 1
  29. pidofproc -p "/run/acpid.pid" > /dev/null
  30. evaluate_retval
  31. ;;
  32. stop)
  33. log_info_msg "Stopping ACPI event daemon..."
  34. killproc -p "/run/acpid.pid" /usr/bin/acpid
  35. evaluate_retval
  36. ;;
  37. restart)
  38. $0 stop
  39. sleep 1
  40. $0 start
  41. ;;
  42. status)
  43. statusproc /usr/bin/acpid
  44. ;;
  45. *)
  46. echo "Usage: $0 {start|stop|restart|status}"
  47. exit 1
  48. ;;
  49. esac
  50. # End acpid