sysklogd 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/sh
  2. # Begin /etc/init.d/sysklogd
  3. ### BEGIN INIT INFO
  4. # Provides: $syslog
  5. # Required-Start: localnet
  6. # Should-Start:
  7. # Required-Stop: $local_fs sendsignals
  8. # Should-Stop:
  9. # Default-Start: 2 3 4 5
  10. # Default-Stop: 0 1 6
  11. # Short-Description: Starts kernel and system log daemons.
  12. # Description: Starts kernel and system log daemons.
  13. # /etc/fstab.
  14. # X-LFS-Default-Start: S10
  15. # X-LFS-Default-Stop: K90
  16. # X-LFS-Provided-By: LFS
  17. ### END INIT INFO
  18. . /lib/lsb/init-functions
  19. case "${1}" in
  20. start)
  21. MESSAGE="system log daemon..."
  22. start_daemon /usr/sbin/syslogd -m 0
  23. evaluate_retval start
  24. MESSAGE="kernel log daemon..."
  25. start_daemon /usr/sbin/klogd
  26. evaluate_retval start
  27. ;;
  28. stop)
  29. MESSAGE="kernel log daemon..."
  30. killproc /usr/sbin/klogd
  31. evaluate_retval stop
  32. MESSAGE="system log daemon..."
  33. killproc /usr/sbin/syslogd
  34. evaluate_retval stop
  35. ;;
  36. force-reload)
  37. MESSAGE="system log daemon config file..."
  38. killproc -HUP `/usr/sbin/syslogd`
  39. evaluate_retval reload
  40. ;;
  41. restart)
  42. MESSAGE="system and kernel log deamons..."
  43. failed=0
  44. killproc /usr/sbin/klogd || failed=1
  45. killproc /usr/sbin/syslogd || failed=1
  46. start_daemon /usr/sbin/syslogd -m 0 || failed=1
  47. start_daemon /usr/sbin/klogd || failed=1
  48. (exit ${failed})
  49. evaluate_retval restart
  50. ;;
  51. status)
  52. statusproc /usr/sbin/syslogd
  53. statusproc /usr/sbin/klogd
  54. ;;
  55. *)
  56. echo "Usage: ${0} {start|stop|force-reload|restart|status}"
  57. exit 1
  58. ;;
  59. esac
  60. # End /etc/init.d/sysklogd