From: Harald Hoyer Date: Thu, 5 Dec 2013 14:57:42 +0000 (+0100) Subject: lvm: install thin tools, only when needed in hostonly X-Git-Tag: 035~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c21c4dc2b469107ac35d8c1157f245965fd55292;p=thirdparty%2Fdracut.git lvm: install thin tools, only when needed in hostonly --- diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh index a220a5599..1206310ba 100755 --- a/modules.d/90lvm/module-setup.sh +++ b/modules.d/90lvm/module-setup.sh @@ -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 } -