lib/specinfra/command/linux/base/selinux.rb in specinfra-2.0.0.beta15 vs lib/specinfra/command/linux/base/selinux.rb in specinfra-2.0.0.beta16

- old
+ new

@@ -1,12 +1,14 @@ class Specinfra::Command::Linux::Base::Selinux < Specinfra::Command::Base::Selinux - def check_has_mode(mode) - cmd = "" - cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled" - cmd += "getenforce | grep -i -- #{escape(mode)} " - cmd += "&& grep -i -- ^SELINUX=#{escape(mode)}$ /etc/selinux/config" - cmd += ")" if mode == "disabled" - cmd + class << self + def check_has_mode(mode) + cmd = "" + cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled" + cmd += "getenforce | grep -i -- #{escape(mode)} " + cmd += "&& grep -i -- ^SELINUX=#{escape(mode)}$ /etc/selinux/config" + cmd += ")" if mode == "disabled" + cmd + end end end