Merge "Make SELinux enforcing/permisssive configurable for tests"

This commit is contained in:
Jenkins 2017-06-20 15:54:26 +00:00 committed by Gerrit Code Review
commit 2b90f57843
1 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ DELOREAN=${DELOREAN:-https://trunk.rdoproject.org/centos7-master/current-passed-
DELOREAN_DEPS=${DELOREAN_DEPS:-https://trunk.rdoproject.org/centos7-master/delorean-deps.repo}
GIT_BASE_URL=${GIT_BASE_URL:-git://git.openstack.org}
ADDITIONAL_ARGS=${ADDITIONAL_ARGS:-}
SELINUX_ENFORCING=${SELINUX_ENFORCING:-true}
# If logs should be retrieved automatically
COPY_LOGS=${COPY_LOGS:-true}
@ -134,6 +135,13 @@ echo "${USER} hard nofile 65536" | $SUDO tee -a /etc/security/limits.conf
echo "root soft nofile 65536" | $SUDO tee -a /etc/security/limits.conf
echo "root hard nofile 65536" | $SUDO tee -a /etc/security/limits.conf
# Set SELinux to enforcing/permissive as needed
if [ "${SELINUX_ENFORCING}" = true ]; then
$SUDO setenforce 1
else
$SUDO setenforce 0
fi
# Setup repositories
if [ "${MANAGE_REPOS}" = true ]; then
$SUDO curl -L ${DELOREAN} -o /etc/yum.repos.d/delorean.repo