PKGBUILDs/core/dmraid/dmraid_hook
2009-10-09 21:17:35 -05:00

17 lines
498 B
Bash

# 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
read dev_t < /sys/class/misc/device-mapper/dev
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
msg ":: Activating dmraid arrays..."
if [ "${quiet}" = "y" ]; then
/sbin/dmraid -ay -Z >/dev/null
else
/sbin/dmraid -ay -Z
fi
fi
}