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