256ebe
From c147bbec10fc72b85301ab6a7580f15713b8a974 Mon Sep 17 00:00:00 2001
256ebe
From: Ambarish <asoman@redhat.com>
256ebe
Date: Tue, 12 Sep 2017 18:34:29 +0530
256ebe
Subject: [PATCH 072/124] ganesha-ha: don't set SELinux booleans if SELinux is
256ebe
 disabled
256ebe
256ebe
semanage commands inside ganesha-ha.sh script will fail if selinux is
256ebe
Disabled. This patch introduces a check if selinux is enabled or not,
256ebe
and subsequently run semange commands only on selinux enabled systems.
256ebe
256ebe
Label: DOWNSTREAM ONLY
256ebe
256ebe
Change-Id: Ibee61cbb1d51a73e6c326b49bac5c7ce06feb310
256ebe
Signed-off-by: Ambarish <asoman@redhat.com>
256ebe
Reviewed-on: https://review.gluster.org/18264
256ebe
Reviewed-by: Niels de Vos <ndevos@redhat.com>
256ebe
Smoke: Gluster Build System <jenkins@build.gluster.org>
256ebe
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
256ebe
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
256ebe
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
256ebe
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
256ebe
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
256ebe
Reviewed-on: https://code.engineering.redhat.com/gerrit/167157
256ebe
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
256ebe
Tested-by: RHGS Build Bot <nigelb@redhat.com>
256ebe
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
256ebe
---
256ebe
 extras/ganesha/scripts/ganesha-ha.sh | 9 ++++++---
256ebe
 1 file changed, 6 insertions(+), 3 deletions(-)
256ebe
256ebe
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
256ebe
index f4400af..e1d3ea0 100644
256ebe
--- a/extras/ganesha/scripts/ganesha-ha.sh
256ebe
+++ b/extras/ganesha/scripts/ganesha-ha.sh
256ebe
@@ -985,7 +985,9 @@ main()
256ebe
         exit 0
256ebe
     fi
256ebe
 
256ebe
-    semanage boolean -m gluster_use_execmem --on
256ebe
+    if (selinuxenabled) ;then
256ebe
+     semanage boolean -m gluster_use_execmem --on
256ebe
+    fi
256ebe
 
256ebe
     HA_CONFDIR=${1%/}; shift
256ebe
     local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
256ebe
@@ -1133,8 +1135,9 @@ $HA_CONFDIR/ganesha-ha.conf
256ebe
 
256ebe
     esac
256ebe
 
256ebe
-    semanage boolean -m gluster_use_execmem --off
256ebe
-
256ebe
+    if (selinuxenabled) ;then
256ebe
+     semanage boolean -m gluster_use_execmem --off
256ebe
+    fi
256ebe
 }
256ebe
 
256ebe
 main $*
256ebe
-- 
256ebe
1.8.3.1
256ebe