diff options
author | James Meyer <james.meyer@operamail.com> | 2010-10-23 18:17:40 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-10-23 18:19:39 (GMT) |
commit | adbcf19958300e9b6598990184c8815b945ba0ee (patch) | |
tree | f4283c850ac0ac202c17e78a637ee7ca8147621b /abs/core/lvm2/lvm2_hook | |
parent | 61a68250df10d29b624650948484898334ff22d0 (diff) | |
download | linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2 |
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/core/lvm2/lvm2_hook')
-rw-r--r-- | abs/core/lvm2/lvm2_hook | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/abs/core/lvm2/lvm2_hook b/abs/core/lvm2/lvm2_hook index b98e87d..13183c6 100644 --- a/abs/core/lvm2/lvm2_hook +++ b/abs/core/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 } |