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