summaryrefslogtreecommitdiffstats
path: root/0001-lvm-install-thin-utils-for-non-hostonly.patch
blob: 5c584b4ab699f10203f73df168c9717aa6741b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From a3c0cef9a79608a45fee94ff6b31f9c63864923f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Oct 2013 10:30:00 +0200
Subject: [PATCH] lvm: install thin utils for non-hostonly

---
 modules.d/90lvm/module-setup.sh | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index f98ffff..514addc 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -52,13 +52,17 @@ install() {
 
     inst lvm
 
-    get_host_lvs | while read line; do
-        printf "%s" " rd.lvm.lv=$line"
-        if ! [[ $_needthin ]]; then
-            [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
-        fi
-    done >> "${initdir}/etc/cmdline.d/90lvm.conf"
-    echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+    if [[ $hostonly ]]; then
+        get_host_lvs | while read line; do
+            printf "%s" " rd.lvm.lv=$line"
+            if ! [[ $_needthin ]]; then
+                [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
+            fi
+        done >> "${initdir}/etc/cmdline.d/90lvm.conf"
+        echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+    else
+        _needthin=1
+    fi
 
     inst_rules "$moddir/64-lvm.rules"