diff options
| author | Steven Dake <stdake@cisco.com> | 2015-03-31 22:15:24 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-04-02 15:17:36 -0700 |
| commit | 7c9acf4806f320084f5152f005a27d1660572016 (patch) | |
| tree | 6100a82b218c06149700fe4e2e94d918fc6c0115 /tools | |
| parent | cf3086ed3bca797ecc34e9c401951d1d64fe326a (diff) | |
| download | kolla-7c9acf4806f320084f5152f005a27d1660572016.tar.gz kolla-7c9acf4806f320084f5152f005a27d1660572016.zip | |
Check for SELinux in enforcing mode and exit if found
Previously the start script would disable SELinux That is a policy
choice by the administrator, not something that should be done in a
development tool. Instead suggest setting SELinux to permissive mode
manually.
Change-Id: I342a1614f9c10ec066cd2a8dc79280481e0b7570
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/start | 11 |
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 |
