diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 00:01:03 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 00:01:03 (GMT) |
commit | 97a671ec90e83af036869180b2b65e4e10fafa2b (patch) | |
tree | 5d66ecb9fbb73d13ea9404890e70872f770d0b04 /abs/core-testing/lvm2/lvm2_hook | |
parent | 525ff794ffbaa59414fdd94c9aa4dcfc6625fa2a (diff) | |
download | linhes_pkgbuild-97a671ec90e83af036869180b2b65e4e10fafa2b.zip linhes_pkgbuild-97a671ec90e83af036869180b2b65e4e10fafa2b.tar.gz linhes_pkgbuild-97a671ec90e83af036869180b2b65e4e10fafa2b.tar.bz2 |
lvm2:Bumped/Updated for LinHES 7.
Diffstat (limited to 'abs/core-testing/lvm2/lvm2_hook')
-rw-r--r-- | abs/core-testing/lvm2/lvm2_hook | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/abs/core-testing/lvm2/lvm2_hook b/abs/core-testing/lvm2/lvm2_hook index b98e87d..13183c6 100644 --- a/abs/core-testing/lvm2/lvm2_hook +++ b/abs/core-testing/lvm2/lvm2_hook @@ -3,14 +3,23 @@ run_hook () { /sbin/modprobe -q dm-mod >/dev/null 2>&1 if [ -e "/sys/class/misc/device-mapper" ]; then - read dev_t < /sys/class/misc/device-mapper/dev - /bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':') + 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 /bin/lvm vgscan --ignorelockingfailure $LVMQUIET + eval /sbin/lvm vgscan --ignorelockingfailure $LVMQUIET msg "Activating logical volumes..." - eval /bin/lvm vgchange --ignorelockingfailure -ay $LVMQUIET + eval /sbin/lvm vgchange --ignorelockingfailure --ignoremonitoring -ay $LVMQUIET fi } |