--- /dev/null
+#!/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
+++ /dev/null
-#!/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
DMRAID_DEPENDENCIES = lvm2
-define DMRAID_INSTALL_INITSCRIPT
- $(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/S20dmraid
+define DMRAID_INSTALL_INIT_SYSV
+ [ -f $(TARGET_DIR)/etc/init.d/S20dmraid ] || \
+ $(INSTALL) -D -m 0755 package/dmraid/S20dmraid \
+ $(TARGET_DIR)/etc/init.d/S20dmraid
endef
-DMRAID_POST_INSTALL_TARGET_HOOKS += DMRAID_INSTALL_INITSCRIPT
-
$(eval $(autotools-package))