mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
26 lines
869 B
Bash
26 lines
869 B
Bash
# vim:set ft=sh:
|
|
run_hook ()
|
|
{
|
|
/sbin/modprobe -q dm-mod >/dev/null 2>&1
|
|
if [ -e "/sys/class/misc/device-mapper" ]; then
|
|
if [ ! -e "/dev/mapper/control" ]; then
|
|
mkdir /dev/mapper
|
|
mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
|
|
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)
|
|
if [ -n "${lvmwait}" ]; then
|
|
for pvdev in $(echo ${lvmwait} | sed 's|,| |g'); do
|
|
poll_device ${pvdev} ${rootdelay}
|
|
done
|
|
fi
|
|
|
|
[ "${quiet}" = "y" ] && LVMQUIET=">/dev/null"
|
|
|
|
msg "Activating logical volumes..."
|
|
[ -d /etc/lvm ] && /sbin/lvm vgscan --sysinit
|
|
eval /sbin/lvm vgchange --sysinit -a y $LVMQUIET
|
|
fi
|
|
}
|