Blame 0058-lvm-install-thin-tools-only-when-needed-in-hostonly.patch
|
Harald Hoyer |
4734ec |
From c21c4dc2b469107ac35d8c1157f245965fd55292 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
4734ec |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
4734ec |
Date: Thu, 5 Dec 2013 15:57:42 +0100
|
|
Harald Hoyer |
4734ec |
Subject: [PATCH] lvm: install thin tools, only when needed in hostonly
|
|
Harald Hoyer |
4734ec |
|
|
Harald Hoyer |
4734ec |
---
|
|
Harald Hoyer |
4734ec |
modules.d/90lvm/module-setup.sh | 9 +++++++--
|
|
Harald Hoyer |
4734ec |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
4734ec |
|
|
Harald Hoyer |
4734ec |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
4734ec |
index a220a55..1206310 100755
|
|
Harald Hoyer |
4734ec |
--- a/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
4734ec |
+++ b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
4734ec |
@@ -97,6 +97,11 @@ install() {
|
|
Harald Hoyer |
4734ec |
|
|
Harald Hoyer |
4734ec |
inst_libdir_file "libdevmapper-event-lvm*.so"
|
|
Harald Hoyer |
4734ec |
|
|
Harald Hoyer |
4734ec |
- inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
|
Harald Hoyer |
4734ec |
+ if [[ $hostonly ]] && type -P lvs &>/dev/null; then
|
|
Harald Hoyer |
4734ec |
+ for dev in "${!host_fs_types[@]}"; do
|
|
Harald Hoyer |
4734ec |
+ if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then
|
|
Harald Hoyer |
4734ec |
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
|
Harald Hoyer |
4734ec |
+ fi
|
|
Harald Hoyer |
4734ec |
+ done
|
|
Harald Hoyer |
4734ec |
+ fi
|
|
Harald Hoyer |
4734ec |
}
|
|
Harald Hoyer |
4734ec |
-
|