mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
20 lines
580 B
Bash
20 lines
580 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
|
|
#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 -Z >/dev/null
|
|
else
|
|
/usr/sbin/dmraid -ay -Z
|
|
fi
|
|
fi
|
|
}
|