From b1802db8078b61fe3ee4d3d6239d069123638932 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Wed, 15 May 2013 19:44:10 +0000 Subject: [PATCH] Do not run selinux commands if it is disabled. * Execution of the setenforce command when selinux was not enabled was resulting in a non-zero exit status, which halted devstack. * Addresses bug 1175444 Change-Id: I7f6492dea7c52d153e755cda826d6fabd53f3771 --- stack.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 7ec25cf9a0..5dea00097a 100755 --- a/stack.sh +++ b/stack.sh @@ -565,7 +565,9 @@ fi if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then # Avoid having to configure selinux to allow things like httpd to # access horizion files or run binaries like nodejs (LP#1175444) - sudo setenforce 0 + if selinuxenabled; then + sudo setenforce 0 + fi # An old version (2.0.1) of python-crypto is probably installed on # a fresh system, via the dependency chain