Force selinux presence when testing

Change-Id: Ica96d93946a0d8583c80afb1475d8dac30c081d2
This commit is contained in:
Riccardo Pittau
2021-07-08 09:18:34 +02:00
parent 43062e2fe7
commit 8f108f907b

View File

@@ -65,6 +65,11 @@ source $SCRIPT_HOME/env-setup.sh
# We're expected to test with SELinux enforcing
if which setenforce &> /dev/null; then
SELINUX_STATUS=$(sudo getenforce)
if [ "$SELINUX_STATUS" == "Disabled" ]; then
echo "Selinux is Disabled, please enable it and restart the host"
exit 1
fi
sudo setenforce Enforcing
fi