cead9d
From f880df2ce4706dd748a09d3d6db57d49f62a234c Mon Sep 17 00:00:00 2001
cead9d
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
cead9d
Date: Thu, 28 May 2020 08:26:47 -0400
cead9d
Subject: [PATCH 383/383] common-ha: ganesha-ha.sh bad test for {rhel,centos}
cead9d
 for pcs options
cead9d
cead9d
bash [[ ... =~ ... ]] built-in returns _0_ when the regex matches,
cead9d
not 1, thus the sense of the test is backwards and never correctly
cead9d
detects rhel or centos.
cead9d
cead9d
https://review.gluster.org/#/c/glusterfs/+/24502/
cead9d
cead9d
Change-Id: Ic9e60aae4ea38aff8f13979080995e60621a68fe
cead9d
BUG: 1840794
cead9d
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
cead9d
Reviewed-on: https://code.engineering.redhat.com/gerrit/201686
cead9d
Tested-by: RHGS Build Bot <nigelb@redhat.com>
cead9d
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
cead9d
---
cead9d
 extras/ganesha/scripts/ganesha-ha.sh | 2 +-
cead9d
 1 file changed, 1 insertion(+), 1 deletion(-)
cead9d
cead9d
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
cead9d
index 4ecf91b..a6814b1 100644
cead9d
--- a/extras/ganesha/scripts/ganesha-ha.sh
cead9d
+++ b/extras/ganesha/scripts/ganesha-ha.sh
cead9d
@@ -1054,7 +1054,7 @@ main()
cead9d
         # Fedora 29+ and rhel/centos 8 has PCS-0.10.x
cead9d
         # default is pcs-0.10.x options but check for
cead9d
         # rhel/centos 7 (pcs-0.9.x) and adjust accordingly
cead9d
-        if [[ ${ID} =~ {rhel,centos} ]]; then
cead9d
+        if [[ ! ${ID} =~ {rhel,centos} ]]; then
cead9d
             if [[ ${VERSION_ID} == 7.* ]]; then
cead9d
                 PCS9OR10_PCS_CNAME_OPTION="--name"
cead9d
                 PCS9OR10_PCS_CLONE_OPTION="--clone"
cead9d
-- 
cead9d
1.8.3.1
cead9d