aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-06 16:04:27 +0000
committerGerrit Code Review <review@openstack.org>2015-04-06 16:04:27 +0000
commitfc1d5dbb623d3952b14151d00046b3176cae5551 (patch)
treef5a284510910b1cdb26ddda2b5e1dccce84602ca /tools
parent2e37f25c5714a8eed65053cc28869f8478209d1b (diff)
parent7c9acf4806f320084f5152f005a27d1660572016 (diff)
downloadkolla-fc1d5dbb623d3952b14151d00046b3176cae5551.tar.gz
kolla-fc1d5dbb623d3952b14151d00046b3176cae5551.zip
Merge "Check for SELinux in enforcing mode and exit if found"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/start11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/start b/tools/start
index ade9bf13f..7e88ae5d0 100755
--- a/tools/start
+++ b/tools/start
@@ -15,8 +15,15 @@ fi
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
-# Set SELinux to permissive
-setenforce permissive
+# Check for SELinux in Enforcing mode and exit if found
+if [[ -x /usr/sbin/getenforce ]]; then
+ if [[ $(/usr/sbin/getenforce) == "Enforcing" ]]; then
+ echo "You must execute this script without SELinux enforcing mode."
+ echo "Turn off SELinux enforcing mode by running:"
+ echo "$ sudo setenforce permissive"
+ exit 1
+ fi
+fi
# This directory is shared with the host to allow qemu instance
# configs to remain accross restarts. This is needed in the event libvirt