summaryrefslogtreecommitdiff
path: root/core/dmraid/dmraid_hook
blob: 6219a718ae6ea4670462cf2b458ddcccbee47035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
}