summaryrefslogtreecommitdiff
path: root/core/dmraid/dmraid_hook
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-06 00:02:44 +0000
committerroot <root@rshg054.dnsready.net>2012-05-06 00:02:44 +0000
commitf37e773fe397778858ea8d51601554863c252536 (patch)
tree9997e525a9baeb85d09bd8e0c12e750781810755 /core/dmraid/dmraid_hook
parent5801c5acd80d30d17aaef76b8bc401c61b3ef3c9 (diff)
Sun May 6 00:02:43 UTC 2012
Diffstat (limited to 'core/dmraid/dmraid_hook')
-rw-r--r--core/dmraid/dmraid_hook29
1 files changed, 12 insertions, 17 deletions
diff --git a/core/dmraid/dmraid_hook b/core/dmraid/dmraid_hook
index 6219a718a..37283e83e 100644
--- a/core/dmraid/dmraid_hook
+++ b/core/dmraid/dmraid_hook
@@ -1,19 +1,14 @@
-# vim: set ft=sh:
-run_hook ()
-{
- /sbin/modprobe -q dm-mod >/dev/null 2>&1
- /sbin/modprobe -q dm-mirror >/dev/null 2>&1
- if [ -e "/sys/class/misc/device-mapper" ]; then
- if [ ! -e "/dev/mapper/control" ]; then
- mkdir /dev/mapper
- mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
- fi
- msg ":: Activating dmraid arrays..."
- # prevent any event monitoring calls with -I
- if [ "${quiet}" = "y" ]; then
- /sbin/dmraid -ay -I -Z >/dev/null
- else
- /sbin/dmraid -ay -I -Z
- fi
+#!/usr/bin/ash
+
+run_hook() {
+ modprobe -a -q dm-mod dm-mirror >/dev/null 2>&1
+ msg ":: Activating dmraid arrays..."
+ # prevent any event monitoring calls with -I
+ if [ "$quiet" = "y" ]; then
+ dmraid -ay -I -Z >/dev/null
+ else
+ dmraid -ay -I -Z
fi
}
+
+# vim: set ft=sh ts=4 sw=4 et: