From 3ad4f77cef57565977c10514e80a9992060e84f0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 23 Jul 2010 12:16:11 +0200 Subject: [PATCH] lvm: wait for all rd_LVM_LV and rd_LVM_VG specified to appear --- modules.d/90lvm/parse-lvm.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules.d/90lvm/parse-lvm.sh b/modules.d/90lvm/parse-lvm.sh index 2d453e8..5e93d3e 100755 --- a/modules.d/90lvm/parse-lvm.sh +++ b/modules.d/90lvm/parse-lvm.sh @@ -1,10 +1,18 @@ -if getarg rd_NO_LVM; then - info "rd_NO_LVM: removing LVM activation" - rm -f /etc/udev/rules.d/64-lvm*.rules -fi - if [ -e /etc/lvm/lvm.conf ] && getarg rd_NO_LVMCONF; then rm -f /etc/lvm/lvm.conf fi +if getarg rd_NO_LVM; then + info "rd_NO_LVM: removing LVM activation" + rm -f /etc/udev/rules.d/64-lvm*.rules +else + for dev in $(getargs rd_LVM_VG=) $(getargs rd_LVM_LV=); do + printf '[ -e "/dev/%s" ] || exit 1\n' $dev \ + >> /initqueue-finished/lvm.sh + { + printf '[ -e "/dev/%s" ] || ' $dev + printf 'warn "LVM "%s" not found"\n' $dev + } >> /emergency/00-lvm.sh + done +fi -- 2.7.4