archboot/lib/initcpio/hooks/arch_dmraid
2009-01-18 21:21:20 +01:00

19 lines
522 B
Bash

# vim: set ft=sh:
run_hook ()
{
/sbin/modprobe -q dm-mod >/dev/null 2>&1
#fix if udev initialises /dev/mapper/control
sleep 0.5
if [ -e "/sys/class/misc/device-mapper" ]; then
if [ ! -c "/dev/mapper/control" ]; then
read dev_t < /sys/class/misc/device-mapper/dev
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
fi
msg ":: Activating dmraid arrays..."
if [ "${quiet}" = "y" ]; then
/usr/sbin/dmraid -ay >/dev/null
else
/usr/sbin/dmraid
fi
fi
}