diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-04 22:53:18 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-04 22:53:18 (GMT) |
commit | 8b10ab5f9a84a51d609aa7acf8ab458890dee889 (patch) | |
tree | 1cee3a3135b6f36609982817ca34a433329b66d4 /abs/core-testing/device-mapper/lvm2_hook | |
parent | 9a6779c18971439b9be0a505a802431a8119fcfa (diff) | |
download | linhes_pkgbuild-8b10ab5f9a84a51d609aa7acf8ab458890dee889.zip linhes_pkgbuild-8b10ab5f9a84a51d609aa7acf8ab458890dee889.tar.gz linhes_pkgbuild-8b10ab5f9a84a51d609aa7acf8ab458890dee889.tar.bz2 |
device-mapper:Bumped/Updated for LinHES 7.
Diffstat (limited to 'abs/core-testing/device-mapper/lvm2_hook')
-rw-r--r-- | abs/core-testing/device-mapper/lvm2_hook | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/abs/core-testing/device-mapper/lvm2_hook b/abs/core-testing/device-mapper/lvm2_hook new file mode 100644 index 0000000..13183c6 --- /dev/null +++ b/abs/core-testing/device-mapper/lvm2_hook @@ -0,0 +1,25 @@ +# 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 + /bin/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 "Scanning logical volumes..." + eval /sbin/lvm vgscan --ignorelockingfailure $LVMQUIET + msg "Activating logical volumes..." + eval /sbin/lvm vgchange --ignorelockingfailure --ignoremonitoring -ay $LVMQUIET + fi +} |