Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 78451

Summary: init.d script to start mdadm monitoring
Product: Gentoo Linux Reporter: Shevek <gentoo>
Component: [OLD] ServerAssignee: 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: ---

Description Shevek 2005-01-17 17:48:11 UTC
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 $?
}
Comment 1 SpanKY gentoo-dev 2005-03-01 15:33:48 UTC

*** This bug has been marked as a duplicate of 57321 ***