resource-agents/SOURCES/bz1808468-1-lvmlockd-fix-co...

29 lines
1.1 KiB
Diff

From 0a299ee9a00ec9e2dccdcf6a4132e55a9207daa5 Mon Sep 17 00:00:00 2001
From: Zhao Heming <heming.zhao@suse.com>
Date: Mon, 24 Feb 2020 11:22:34 +0800
Subject: [PATCH] [lvmlockd] support lvm2-2.03 removing lvmetad
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
---
heartbeat/lvmlockd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/lvmlockd b/heartbeat/lvmlockd
index 3c8c69cc9..e80c7647e 100755
--- a/heartbeat/lvmlockd
+++ b/heartbeat/lvmlockd
@@ -196,11 +196,11 @@ setup_lvm_config()
out=$(lvmconfig 'global/locking_type')
lock_type=$(echo "$out" | cut -d'=' -f2)
- if [ "$use_lvmlockd" -ne 1 ] ; then
+ if [ "$use_lvmlockd" != 1 ] ; then
ocf_log info "setting \"use_lvmlockd=1\" in /etc/lvm/lvm.conf ..."
sed -i 's,^[[:blank:]]*use_lvmlockd[[:blank:]]*=.*,\ \ \ \ use_lvmlockd = 1,g' /etc/lvm/lvm.conf
fi
- if [ "$lock_type" -ne 1 ] ; then
+ if [ "$lock_type" != 1 ] ; then
ocf_log info "setting \"locking_type=1\" in /etc/lvm/lvm.conf ..."
sed -i 's,^[[:blank:]]*locking_type[[:blank:]]*=.*,\ \ \ \ locking_type = 1,g' /etc/lvm/lvm.conf
fi