# vim:set ft=sh: run_hook () { modprobe -q dm-mod >/dev/null 2>&1 if [[ ! -e /sys/class/misc/device-mapper ]]; then return fi if [[ ! -e /dev/mapper/control ]]; then IFS=':' read maj min < /sys/class/misc/device-mapper/dev mknod "/dev/mapper/control" c $maj $min fi # If the lvmwait= parameter has been specified on the command line # wait for the device(s) before trying to activate the volume group(s) for pvdev in ${lvmwait//,/ }; do poll_device $pvdev $rootdelay done [[ "$quiet" = y ]] && LVMQUIET=">/dev/null" msg "Activating logical volumes..." if grep -q 'crypt_iterate_devices ' /proc/kallsyms; then eval /sbin/lvm vgscan --ignorelockingfailure $LVMQUIET fi eval lvm vgchange --sysinit -a y $LVMQUIET }