|
|
a0a3b4 |
From 20171c75197c799d4710d04a0d6d1f73c510213b Mon Sep 17 00:00:00 2001
|
|
|
a0a3b4 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
a0a3b4 |
Date: Fri, 22 Jul 2016 13:26:10 +0200
|
|
|
a0a3b4 |
Subject: [PATCH] lvm: include /etc/lvm/lvm_<host_tag>.conf
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
https://bugzilla.redhat.com/show_bug.cgi?id=1328778
|
|
|
a0a3b4 |
---
|
|
|
a0a3b4 |
modules.d/90lvm/module-setup.sh | 17 ++++++++++-------
|
|
|
a0a3b4 |
1 file changed, 10 insertions(+), 7 deletions(-)
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
|
1755ca |
index 5e374fbc..23d63a04 100755
|
|
|
a0a3b4 |
--- a/modules.d/90lvm/module-setup.sh
|
|
|
a0a3b4 |
+++ b/modules.d/90lvm/module-setup.sh
|
|
|
a0a3b4 |
@@ -60,13 +60,16 @@ install() {
|
|
|
a0a3b4 |
inst_rules "$moddir/64-lvm.rules"
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then
|
|
|
a0a3b4 |
- if [ -f /etc/lvm/lvm.conf ]; then
|
|
|
a0a3b4 |
- inst_simple /etc/lvm/lvm.conf
|
|
|
a0a3b4 |
- # FIXME: near-term hack to establish read-only locking;
|
|
|
a0a3b4 |
- # use command-line lvm.conf editor once it is available
|
|
|
a0a3b4 |
- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf
|
|
|
a0a3b4 |
- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf
|
|
|
a0a3b4 |
- fi
|
|
|
a0a3b4 |
+ for f in /etc/lvm/lvm.conf /etc/lvm/lvm_*.conf; do
|
|
|
a0a3b4 |
+ [ -e "$f" ] || continue
|
|
|
a0a3b4 |
+ inst_simple "$f"
|
|
|
a0a3b4 |
+ if [ -f "${initdir}/$f" ]; then
|
|
|
a0a3b4 |
+ # FIXME: near-term hack to establish read-only locking;
|
|
|
a0a3b4 |
+ # use command-line lvm.conf editor once it is available
|
|
|
a0a3b4 |
+ sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/$f"
|
|
|
a0a3b4 |
+ sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/$f"
|
|
|
a0a3b4 |
+ fi
|
|
|
a0a3b4 |
+ done
|
|
|
a0a3b4 |
fi
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then
|