summaryrefslogtreecommitdiffstats
path: root/package/dmraid/dmraid.init
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-07-19 17:51:12 +0000
committerEric Andersen <andersen@codepoet.org>2006-07-19 17:51:12 +0000
commita7b84fab16054511186a28064b5672576b09a24d (patch)
tree18c9e3dbf3c26f99dd8e8597aa6cb70edc065424 /package/dmraid/dmraid.init
parent1c911f7f4f914376258f4bebaeeb6c537df818d1 (diff)
downloadbuildroot-novena-a7b84fab16054511186a28064b5672576b09a24d.tar.gz
buildroot-novena-a7b84fab16054511186a28064b5672576b09a24d.zip
oops
Diffstat (limited to 'package/dmraid/dmraid.init')
-rw-r--r--package/dmraid/dmraid.init31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/dmraid/dmraid.init b/package/dmraid/dmraid.init
new file mode 100644
index 000000000..43240e266
--- /dev/null
+++ b/package/dmraid/dmraid.init
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# try to load module in case that hasn't been done yet
+modprobe dm-mod >/dev/null 2>&1
+
+set -e
+
+[ -x /sbin/dmraid ] || exit 0
+
+case "$1" in
+ start|"")
+ echo "Setting up DMRAID devices..."
+ /sbin/dmraid --activate yes --ignorelocking --verbose
+ ;;
+
+ stop)
+ echo "Shutting down DMRAID devices... "
+ /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