oops
authorEric Andersen <andersen@codepoet.org>
Wed, 19 Jul 2006 17:51:12 +0000 (17:51 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 19 Jul 2006 17:51:12 +0000 (17:51 -0000)
package/dmraid/dmraid.init [new file with mode: 0644]
package/dmraid/dmraid.mk

diff --git a/package/dmraid/dmraid.init b/package/dmraid/dmraid.init
new file mode 100644 (file)
index 0000000..43240e2
--- /dev/null
@@ -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
index 4135ba4f4fa0e21599d60316e96fa4a777950392..57e04a98e2e4da48e4e22696e8812e0d479e6bbc 100644 (file)
@@ -18,7 +18,7 @@ $(DL_DIR)/$(DMRAID_SOURCE):
 
 $(DMRAID_DIR)/.unpacked: $(DL_DIR)/$(DMRAID_SOURCE)
        $(DMRAID_CAT) $(DL_DIR)/$(DMRAID_SOURCE) | tar -C $(BUILD_DIR) -xvf -
-       $(SOURCE_DIR)/patch-kernel.sh $(DMRAID_DIR) $(SOURCE_DIR) dmraid\*.patch
+       toolchain/patch-kernel.sh $(DMRAID_DIR) package/dmraid \*.patch
        touch $(DMRAID_DIR)/.unpacked
 
 $(DMRAID_DIR)/.configured: $(DMRAID_DIR)/.unpacked
@@ -44,7 +44,7 @@ $(DMRAID_DIR)/tools/$(DMRAID_BINARY): $(DMRAID_DIR)/.configured
 
 $(DMRAID_TARGET_BINARY): $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
        $(INSTALL) -m 0755 $? $@
-       $(INSTALL) -m 0755 $(SOURCE_DIR)/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid
+       $(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid
 
 dmraid: uclibc dm $(DMRAID_TARGET_BINARY)