Blame SOURCES/bz1808468-1-lvmlockd-fix-conditionals.patch

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