archboot/lib/initcpio/hooks/arch_dmraid

20 lines
526 B
Text
Raw Normal View History

2008-10-20 22:39:25 +02:00
# 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
2008-12-06 19:12:19 +01:00
msg ":: Activating dmraid arrays..."
if [ "${quiet}" = "y" ]; then
/usr/sbin/dmraid -ay >/dev/null
else
2009-01-26 16:48:45 +01:00
/usr/sbin/dmraid -ay
2008-12-06 19:12:19 +01:00
fi
2008-10-20 22:39:25 +02:00
fi
}