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

Version Path
specinfra-rb19-2.44.7 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.66.2 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.66.1 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.66.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.65.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.64.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.63.3 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.63.2 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.63.1 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.63.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.62.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.61.3 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.61.2 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.61.1 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.61.0 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.60.4 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.60.3 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.60.2 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.60.1 lib/specinfra/command/linux/base/selinux.rb
specinfra-2.60.0 lib/specinfra/command/linux/base/selinux.rb