sysklogd 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin sysklogd
  4. #
  5. # Description : Sysklogd loader
  6. #
  7. # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
  8. # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
  9. #
  10. # Version : LFS 7.0
  11. #
  12. ########################################################################
  13. ### BEGIN INIT INFO
  14. # Provides: $syslog
  15. # Required-Start: localnet
  16. # Should-Start:
  17. # Required-Stop: $local_fs sendsignals
  18. # Should-Stop:
  19. # Default-Start: 2 3 4 5
  20. # Default-Stop: 0 1 6
  21. # Short-Description: Starts kernel and system log daemons.
  22. # Description: Starts kernel and system log daemons.
  23. # /etc/fstab.
  24. # X-LFS-Provided-By: LFS
  25. ### END INIT INFO
  26. . /lib/boot/functions
  27. case "${1}" in
  28. start)
  29. boot_mesg "Starting system log daemon..."
  30. PARMS=${SYSKLOGD_PARMS=-'-m 0'}
  31. loadproc syslogd $PARMS
  32. boot_mesg "Starting kernel log daemon..."
  33. loadproc klogd
  34. ;;
  35. stop)
  36. boot_mesg "Stopping kernel log daemon..."
  37. killproc klogd
  38. boot_mesg "Stopping system log daemon..."
  39. killproc syslogd
  40. ;;
  41. reload)
  42. boot_mesg "Reloading system log daemon config file..."
  43. reloadproc syslogd
  44. ;;
  45. restart)
  46. ${0} stop
  47. sleep 1
  48. ${0} start
  49. ;;
  50. status)
  51. statusproc syslogd
  52. statusproc klogd
  53. ;;
  54. *)
  55. echo "Usage: ${0} {start|stop|reload|restart|status}"
  56. exit 1
  57. ;;
  58. esac
  59. # End sysklogd