diff --git a/manifests/config.pp b/manifests/config.pp index d212f0f3..1cc57f7b 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -61,8 +61,9 @@ } exec { "change-selinux-status-to-${mode}": - command => "echo ${sestatus} > /${::selinux::params::sx_fs_mount}/enforce", - unless => "grep -q '${sestatus}' /${::selinux::params::sx_fs_mount}/enforce", + command => "setenforce ${sestatus}", + unless => "getenforce | grep -qi ${mode}", + path => '/bin:/usr/bin:/usr/sbin', } } else { fail("Invalid mode specified for SELinux: ${mode}")