mdadm.rc 465 B

1234567891011121314151617181920212223242526
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2006 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. use logger dns net
  6. }
  7. start() {
  8. ebegin "Starting mdadm monitor"
  9. mdadm --monitor --scan \
  10. --daemonise \
  11. --pid-file /var/run/mdadm.pid \
  12. ${MDADM_OPTS}
  13. eend $?
  14. }
  15. stop() {
  16. local ret
  17. ebegin "Stopping mdadm monitor"
  18. start-stop-daemon --stop --pidfile /var/run/mdadm.pid
  19. ret=$?
  20. rm -f /var/run/mdadm.pid
  21. eend ${ret}
  22. }