Blame SOURCES/0022-lvm-install-thin-utils-for-non-hostonly.patch

712866
From 52d3c1b7267b6930fe6a835b4000546c5f106d0e Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Tue, 8 Oct 2013 10:30:00 +0200
712866
Subject: [PATCH] lvm: install thin utils for non-hostonly
712866
712866
---
712866
 modules.d/90lvm/module-setup.sh | 18 +++++++++++-------
712866
 1 file changed, 11 insertions(+), 7 deletions(-)
712866
712866
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
5c6c2a
index f98ffffd..514addc1 100755
712866
--- a/modules.d/90lvm/module-setup.sh
712866
+++ b/modules.d/90lvm/module-setup.sh
712866
@@ -52,13 +52,17 @@ install() {
712866
 
712866
     inst lvm
712866
 
712866
-    get_host_lvs | while read line; do
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
-    echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
712866
+    if [[ $hostonly ]]; then
712866
+        get_host_lvs | while read line; do
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
+        echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
712866
+    else
712866
+        _needthin=1
712866
+    fi
712866
 
712866
     inst_rules "$moddir/64-lvm.rules"
712866