Blame SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch

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