Sha256: e3ee5b57693dcb05f0ef3e38f96fe6a4955882c80c7ae29ab2b719e23163d369
Contents?: true
Size: 549 Bytes
Versions: 78
Compression:
Stored size: 549 Bytes
Contents
class Specinfra::Command::Linux::Base::Selinux < Specinfra::Command::Base::Selinux class << self def check_has_mode(mode, policy = nil) cmd = "" cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled" cmd += "getenforce | grep -i -- #{escape(mode)}" cmd += %Q{ && grep -iE -- '^\\s*SELINUX=#{escape(mode)}\\>' /etc/selinux/config} cmd += %Q{ && grep -iE -- '^\\s*SELINUXTYPE=#{escape(policy)}\\>' /etc/selinux/config} if policy != nil cmd += ")" if mode == "disabled" cmd end end end
Version data entries
78 entries across 78 versions & 2 rubygems