rc.main 576 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh -
  2. #
  3. # acpid/rc.main
  4. #
  5. # Advanced Configuration and Power Interface event daemon.
  6. #
  7. # Redirects the standard error to the standard output
  8. exec 2>&1
  9. TARGET="$1"
  10. SVNAME="${2:-acpid}"
  11. start()
  12. {
  13. echo "*** ${SVNAME}: Starting acpid ..."
  14. exec /usr/sbin/acpid -f -l --tpmutefix
  15. }
  16. reset()
  17. {
  18. case $3 in
  19. exit)
  20. echo "*** ${SVNAME}: Exited status $4"
  21. ;;
  22. signal)
  23. echo "*** ${SVNAME}: Killed on signal $5"
  24. ;;
  25. *)
  26. echo "*** ${SVNAME}: Stopped (${3})"
  27. ;;
  28. esac
  29. }
  30. # Branch to target
  31. eval ${TARGET} "$@"