#!/bin/sh ######################################################################## # Begin $rc_base/init.d/mdadm # # Description : This script controls software Raid # # Authors : Dirk Hoefle # # Version : 01.00 # # Notes : # ######################################################################## . /etc/sysconfig/rc . ${rc_functions} case "${1}" in start) boot_mesg "Scan/assemble mdadm raid devices..." mdadm --assemble --scan echo_ok ;; stop) boot_mesg "Stopping Raid devices..." mdadm --stop --scan echo_ok ;; restart) ${0} stop sleep 1 ${0} start ;; status) cat /proc/mdstat ;; *) echo "Usage: ${0} {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/mdadm