Add a status line for SELinux status
Some gate jobs appear to have SELinux in enforcing mode occasionally. SELinux support is improving but OSA is not ready to run in enforcing more until some remaining bugs are fixed. This patch adds a line that prints the current SELinux status during testing. Change-Id: I054c1849e5426801f6fdde761b7f64a2e8867af4
This commit is contained in:
parent
3c595b9c30
commit
aeb82835f0
@ -85,6 +85,14 @@ if [[ -x /usr/bin/yum-config-manager ]] && [[ -e /etc/centos-release ]]; then
|
||||
sudo yum-config-manager --enable updates > /dev/null
|
||||
fi
|
||||
|
||||
# Check if SELinux is present and which mode is currently set.
|
||||
if [[ -x /usr/sbin/getenforce ]]; then
|
||||
SELINUX_STATUS=$(/usr/sbin/getenforce)
|
||||
else
|
||||
SELINUX_STATUS="Unavailable"
|
||||
fi
|
||||
echo "Current SELinux status: ${SELINUX_STATUS}"
|
||||
|
||||
# Ensure that the Ansible environment is properly prepared
|
||||
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user