From: Cong Wang <[email protected]>

rd.lvm.lv accepts ${DM_VG_NAME}/${DM_LV_NAME}, not ${DM_LV_NAME}.

Signed-off-by: Cong Wang <[email protected]>
---
 modules.d/90lvm/module-setup.sh |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index c910f13..01bfa8a 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -11,16 +11,11 @@ check() {
     [[ $debug ]] && set -x
 
     check_lvm() {
-        local dev=$1
-        DM_LV_NAME=$(udevadm info --query=property --name=$dev \
-            | while read line; do
-                [[ ${line#DM_LV_NAME} = $line ]] && continue
-                eval "$line"
-                echo $DM_LV_NAME
-                break
-                done)
-        [[ ${DM_LV_NAME} ]] || continue
-        echo " rd.lvm.lv=${DM_LV_NAME} " >> 
"${initdir}/etc/cmdline.d/90lvm.conf"
+        unset DM_VG_NAME
+        unset DM_LV_NAME
+        eval $(udevadm info --query=property --name=$1|egrep 
'(DM_VG_NAME|DM_LV_NAME)=')
+        [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return
+        echo " rd.lvm.lv=${DM_VG_NAME}/${DM_LV_NAME} " >> 
"${initdir}/etc/cmdline.d/90lvm.conf"
     }
 
     [[ $hostonly ]] || [[ $mount_needs ]] && {
-- 
1.7.7.4

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to