a56a5e
From 1a21ed8d1dbec162986fff9f30d5efc68107524e Mon Sep 17 00:00:00 2001
90b079
From: Harald Hoyer <harald@redhat.com>
90b079
Date: Wed, 16 Oct 2013 11:30:08 +0200
90b079
Subject: [PATCH] lvm: fix thin recognition
90b079
90b079
The global var setting was happening in a pipe and did not have an
90b079
effect.
90b079
90b079
Use <<<$() instead.
90b079
90b079
< <() cannot be used, because dracut is called in chroot's environments,
90b079
where /dev/fd does not point to /proc/self/fd, but bash wants
90b079
/dev/fd/<num> for this construct.
90b079
---
90b079
 modules.d/90lvm/module-setup.sh | 5 +++--
90b079
 1 file changed, 3 insertions(+), 2 deletions(-)
90b079
90b079
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
1755ca
index 514addc1..50d9b98e 100755
90b079
--- a/modules.d/90lvm/module-setup.sh
90b079
+++ b/modules.d/90lvm/module-setup.sh
90b079
@@ -53,12 +53,13 @@ install() {
90b079
     inst lvm
90b079
 
90b079
     if [[ $hostonly ]]; then
90b079
-        get_host_lvs | while read line; do
90b079
+        while read line; do
90b079
+            [[ -n "$line" ]] || continue
90b079
             printf "%s" " rd.lvm.lv=$line"
90b079
             if ! [[ $_needthin ]]; then
90b079
                 [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
90b079
             fi
90b079
-        done >> "${initdir}/etc/cmdline.d/90lvm.conf"
90b079
+        done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf"
90b079
         echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
90b079
     else
90b079
         _needthin=1