summaryrefslogtreecommitdiffstats
path: root/package/dmraid/S20dmraid
blob: fd2ad9e845fe3090cf99337cd71260c6e269fcb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

set -e

[ -x /usr/sbin/dmraid ] || exit 0

# try to load module in case that hasn't been done yet
modprobe dm-mod >/dev/null 2>&1

case "$1" in
	start|"")
		echo "Setting up DMRAID devices..."
		/usr/sbin/dmraid --activate yes --ignorelocking --verbose
		;;

	stop)
		echo "Shutting down DMRAID devices... "
		/usr/sbin/dmraid --activate no --ignorelocking --verbose
		;;

	restart|force-reload)
		$0 stop
		sleep 1
		$0 start
		;;

	*)
		echo "Usage: dmraid {start|stop|restart|force-reload}"
		exit 1
		;;
esac