Blame tests/p_selinux/selinux_enforce.sh

Athmane Madjoudj 2706f5
#!/bin/bash
Athmane Madjoudj 2706f5
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj 2706f5
Athmane Madjoudj 2706f5
t_Log "Running $0 - check if SELinux is in enforcing mode"
Athmane Madjoudj 2706f5
Pablo Greco f21da5
if [ "$centos_ver" -ge 7 ] ; then
256acb
  selinux_file=/sys/fs/selinux/enforce
256acb
else
256acb
  selinux_file=/selinux/enforce
256acb
fi
256acb
256acb
if [ "$SKIP_QA_HARNESS" = "1" ] ; then
Pablo Greco f21da5
    t_Log "Skipping this test ..."
Athmane Madjoudj 9d2331
else
256acb
    cat $selinux_file | grep 1  > /dev/null 2>&1
Athmane Madjoudj 9d2331
    t_CheckExitStatus $?
Athmane Madjoudj 9d2331
fi
256acb