| Summary: | init.d script to start mdadm monitoring | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Shevek <gentoo> |
| Component: | [OLD] Server | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | enhancement | ||
| Priority: | High | ||
| Version: | 2004.3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
It would be nice if the mdadm ebuild installed a nice script to start monitoring. Note that mdadm will exit if an email address is not specified in /etc/mdadm.conf or there are no RAIDs to monitor. I hereby place the following almost-triviality into the public domain. Do with it as you wish. #!/sbin/runscript # Copyright 1999-2005 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 depend() { use net } start() { ebegin "Starting mdadm" /sbin/mdadm --monitor --scan --daemonise > /var/run/mdadm.pid eend $? } stop() { ebegin "Stopping mdadm" kill `cat /var/run/mdadm.pid` eend $? }