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

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