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

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