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