|
Harald Hoyer |
e7efcf |
From a3c0cef9a79608a45fee94ff6b31f9c63864923f Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
e7efcf |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
e7efcf |
Date: Tue, 8 Oct 2013 10:30:00 +0200
|
|
Harald Hoyer |
e7efcf |
Subject: [PATCH] lvm: install thin utils for non-hostonly
|
|
Harald Hoyer |
e7efcf |
|
|
Harald Hoyer |
e7efcf |
---
|
|
Harald Hoyer |
e7efcf |
modules.d/90lvm/module-setup.sh | 18 +++++++++++-------
|
|
Harald Hoyer |
e7efcf |
1 file changed, 11 insertions(+), 7 deletions(-)
|
|
Harald Hoyer |
e7efcf |
|
|
Harald Hoyer |
e7efcf |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
e7efcf |
index f98ffff..514addc 100755
|
|
Harald Hoyer |
e7efcf |
--- a/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
e7efcf |
+++ b/modules.d/90lvm/module-setup.sh
|
|
Harald Hoyer |
e7efcf |
@@ -52,13 +52,17 @@ install() {
|
|
Harald Hoyer |
e7efcf |
|
|
Harald Hoyer |
e7efcf |
inst lvm
|
|
Harald Hoyer |
e7efcf |
|
|
Harald Hoyer |
e7efcf |
- get_host_lvs | while read line; do
|
|
Harald Hoyer |
e7efcf |
- printf "%s" " rd.lvm.lv=$line"
|
|
Harald Hoyer |
e7efcf |
- if ! [[ $_needthin ]]; then
|
|
Harald Hoyer |
e7efcf |
- [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
|
|
Harald Hoyer |
e7efcf |
- fi
|
|
Harald Hoyer |
e7efcf |
- done >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
e7efcf |
- echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
e7efcf |
+ if [[ $hostonly ]]; then
|
|
Harald Hoyer |
e7efcf |
+ get_host_lvs | while read line; do
|
|
Harald Hoyer |
e7efcf |
+ printf "%s" " rd.lvm.lv=$line"
|
|
Harald Hoyer |
e7efcf |
+ if ! [[ $_needthin ]]; then
|
|
Harald Hoyer |
e7efcf |
+ [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
|
|
Harald Hoyer |
e7efcf |
+ fi
|
|
Harald Hoyer |
e7efcf |
+ done >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
e7efcf |
+ echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
|
|
Harald Hoyer |
e7efcf |
+ else
|
|
Harald Hoyer |
e7efcf |
+ _needthin=1
|
|
Harald Hoyer |
e7efcf |
+ fi
|
|
Harald Hoyer |
e7efcf |
|
|
Harald Hoyer |
e7efcf |
inst_rules "$moddir/64-lvm.rules"
|
|
Harald Hoyer |
e7efcf |
|