rc.main 566 B

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