Files
bpfire/src/initscripts/init.d/mdadm
Arne Fitzenreiter d366bd9f33 mdadm: update to 3.2.1.
changed initskript to scan also for raid devices if no config is present.
2011-04-21 11:03:43 +02:00

48 lines
767 B
Bash

#!/bin/sh
########################################################################
# Begin $rc_base/init.d/mdadm
#
# Description : This script controls software Raid
#
# Authors : Dirk Hoefle <dhoefle@gmx.net>
#
# 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