From af1e6c210b43ea6b8e043524edccb1d0befd257f Mon Sep 17 00:00:00 2001 From: root Date: Sun, 22 Apr 2012 00:02:56 +0000 Subject: Sun Apr 22 00:02:56 UTC 2012 --- testing/dmraid/dmraid_hook | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testing/dmraid/dmraid_hook (limited to 'testing/dmraid/dmraid_hook') diff --git a/testing/dmraid/dmraid_hook b/testing/dmraid/dmraid_hook new file mode 100644 index 000000000..6219a718a --- /dev/null +++ b/testing/dmraid/dmraid_hook @@ -0,0 +1,19 @@ +# 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 + fi +} -- cgit v1.2.3-54-g00ecf