2006-07-19 19:51:12 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2010-09-16 15:14:35 +02:00
|
|
|
[ -x /usr/sbin/dmraid ] || exit 0
|
2006-07-19 19:51:12 +02:00
|
|
|
|
2009-03-04 14:22:38 +01:00
|
|
|
# try to load module in case that hasn't been done yet
|
|
|
|
modprobe dm-mod >/dev/null 2>&1
|
|
|
|
|
2006-07-19 19:51:12 +02:00
|
|
|
case "$1" in
|
|
|
|
start|"")
|
|
|
|
echo "Setting up DMRAID devices..."
|
2010-09-16 15:14:35 +02:00
|
|
|
/usr/sbin/dmraid --activate yes --ignorelocking --verbose
|
2006-07-19 19:51:12 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
stop)
|
|
|
|
echo "Shutting down DMRAID devices... "
|
2010-09-16 15:14:35 +02:00
|
|
|
/usr/sbin/dmraid --activate no --ignorelocking --verbose
|
2006-07-19 19:51:12 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
restart|force-reload)
|
|
|
|
$0 stop
|
|
|
|
sleep 1
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Usage: dmraid {start|stop|restart|force-reload}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|