]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
lvm: install thin utils for non-hostonly
authorHarald Hoyer <harald@redhat.com>
Tue, 8 Oct 2013 08:30:00 +0000 (10:30 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 8 Oct 2013 08:30:00 +0000 (10:30 +0200)
modules.d/90lvm/module-setup.sh

index f98ffffddb5800634e0bd21627a73142d5f91b94..514addc1daafd63d669a99a2801e68f75037c495 100755 (executable)
@@ -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"