rc.main 533 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh -
  2. #
  3. # atd/rc.main
  4. #
  5. # Run jobs queued for later execution.
  6. #
  7. # Redirects the standard error to the standard output
  8. exec 2>&1
  9. TARGET="$1"
  10. SVNAME="${2:-atd}"
  11. start()
  12. {
  13. echo "*** ${SVNAME}: Starting atd ..."
  14. exec /usr/sbin/atd -d
  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} "$@"