#!/sbin/runscript # script to start raid devices described in /etc/mdadm.conf. start() { [ -f /proc/mdstat ] || modprobe -k md > /dev/null 2>&1 ebegin "Starting RAID devices" mdadm -A -s -q eend $? } stop() { # you need to make sure no device is mounted. if [ -f /etc/mdadm.conf ] ; then ebegin "Stopping RAID devices" mdadm --stop -q `awk '/^ARRAY/ { print $2 }' /etc/mdadm.conf` eend $? fi }