summaryrefslogtreecommitdiff
path: root/core/dmraid/dmraid_hook
diff options
context:
space:
mode:
Diffstat (limited to 'core/dmraid/dmraid_hook')
-rw-r--r--core/dmraid/dmraid_hook18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/dmraid/dmraid_hook b/core/dmraid/dmraid_hook
new file mode 100644
index 000000000..d4e758c34
--- /dev/null
+++ b/core/dmraid/dmraid_hook
@@ -0,0 +1,18 @@
+# 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
+ /bin/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
+ fi
+}