summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAmbarish <asoman@redhat.com>2017-09-12 18:34:29 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-09-16 13:01:48 +0000
commitb4eca2f985d8207183f15fccfc2f907737625097 (patch)
tree91c44aaebecdbc7ec0bec4690872cff4c1aaaae4 /extras
parent3ac9840d109554ad92937e8d89bc95e7d2289de2 (diff)
ganesha-ha: don't set SELinux booleans if SELinux is disabled
semanage commands inside ganesha-ha.sh script will fail if selinux is Disabled. This patch introduces a check if selinux is enabled or not, and subsequently run semange commands only on selinux enabled systems. Change-Id: Ibee61cbb1d51a73e6c326b49bac5c7ce06feb310 BUG: 1490909 Signed-off-by: Ambarish <asoman@redhat.com> Reviewed-on: https://review.gluster.org/18264 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Daniel Gryniewicz <dang@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 5d3bf8413b8..2098b77975b 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -977,7 +977,9 @@ main()
exit 0
fi
- semanage boolean -m gluster_use_execmem --on
+ if (selinuxenabled) ;then
+ semanage boolean -m gluster_use_execmem --on
+ fi
HA_CONFDIR=${1%/}; shift
local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
@@ -1134,8 +1136,9 @@ $HA_CONFDIR/ganesha-ha.conf
esac
- semanage boolean -m gluster_use_execmem --off
-
+ if (selinuxenabled) ;then
+ semanage boolean -m gluster_use_execmem --off
+ fi
}
main $*