Blame SOURCES/0026-lvm-fix-thin-recognition.patch

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