]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
lvm: install thin tools, only when needed in hostonly
authorHarald Hoyer <harald@redhat.com>
Thu, 5 Dec 2013 14:57:42 +0000 (15:57 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Dec 2013 14:57:42 +0000 (15:57 +0100)
modules.d/90lvm/module-setup.sh

index a220a5599e756a0e26b568bab7de246d67b9cf09..1206310bae86d477a7817f82ad317a6d825c34a0 100755 (executable)
@@ -97,6 +97,11 @@ install() {
 
     inst_libdir_file "libdevmapper-event-lvm*.so"
 
-    inst_multiple -o thin_dump thin_restore thin_check thin_repair
+    if [[ $hostonly ]] && type -P lvs &>/dev/null; then
+        for dev in "${!host_fs_types[@]}"; do
+            if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then
+                inst_multiple -o thin_dump thin_restore thin_check thin_repair
+            fi
+        done
+    fi
 }
-