From b0dfc1c5e612e58be87f8ebf2cdb5ab99e150f5c Mon Sep 17 00:00:00 2001 From: Alejandro Andreu Date: Thu, 9 Jun 2016 16:18:03 +0200 Subject: [PATCH] setenforce will not return 1 on run_tests.sh checking selinuxenabled exit code before will ensure that the script does not exit prematurely, since the bash -e flag is set Change-Id: Id4f0831612f69f448e627453352bd88ce089da2f --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index ee7c47fac..b6d602d5e 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -97,7 +97,7 @@ elif is_fedora; then $SUDO service auditd start # SElinux in permissive mode so later we can catch alerts - $SUDO setenforce 0 + $SUDO selinuxenabled && $SUDO setenforce 0 fi PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --trace"