From 256acbee5f7d0293bd164cc92bb6f5370d6e9e2e Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jun 29 2014 12:04:24 +0000 Subject: Fixed the selinux test for c7 (selinux fs mounted under /sys/fs now) --- diff --git a/tests/p_selinux/selinux_enforce.sh b/tests/p_selinux/selinux_enforce.sh index 38fbb49..b3c90d2 100755 --- a/tests/p_selinux/selinux_enforce.sh +++ b/tests/p_selinux/selinux_enforce.sh @@ -3,9 +3,16 @@ t_Log "Running $0 - check if SELinux is in enforcing mode" -if [ $SKIP_QA_HARNESS -eq 1 ]; then +if [ "$centos_ver" = "7" ] ; then + selinux_file=/sys/fs/selinux/enforce +else + selinux_file=/selinux/enforce +fi + +if [ "$SKIP_QA_HARNESS" = "1" ] ; then echo "Skipping this test ..." else - cat /selinux/enforce | grep 1 > /dev/null 2>&1 + cat $selinux_file | grep 1 > /dev/null 2>&1 t_CheckExitStatus $? fi +