Sha256: f9a3bbb88a3832077ca14530fed69020dc314e413ec0d94b85ccd3626e141498

Contents?: true

Size: 410 Bytes

Versions: 19

Compression:

Stored size: 410 Bytes

Contents

module Serverspec
  module Commands
    class RedHat < Linux
      def check_access_by_user file, user, access
        # Redhat-specific
        "runuser -s sh -c \"test -#{access} #{file}\" #{user}"
      end

      def check_enabled service
        "chkconfig --list #{escape(service)} | grep 3:on"
      end

      def check_installed package
        "rpm -q #{escape(package)}"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
serverspec-0.6.6 lib/serverspec/commands/redhat.rb
serverspec-0.6.5 lib/serverspec/commands/redhat.rb
serverspec-0.6.4 lib/serverspec/commands/redhat.rb
serverspec-0.6.3 lib/serverspec/commands/redhat.rb
serverspec-0.6.2 lib/serverspec/commands/redhat.rb
serverspec-0.6.1 lib/serverspec/commands/redhat.rb
serverspec-0.6.0 lib/serverspec/commands/redhat.rb
serverspec-0.5.8 lib/serverspec/commands/redhat.rb
serverspec-0.5.7 lib/serverspec/commands/redhat.rb
serverspec-0.5.6 lib/serverspec/commands/redhat.rb
serverspec-0.5.5 lib/serverspec/commands/redhat.rb
serverspec-0.5.4 lib/serverspec/commands/redhat.rb
serverspec-0.5.3 lib/serverspec/commands/redhat.rb
serverspec-0.5.2 lib/serverspec/commands/redhat.rb
serverspec-0.5.1 lib/serverspec/commands/redhat.rb
serverspec-0.5.0 lib/serverspec/commands/redhat.rb
serverspec-0.4.14 lib/serverspec/commands/redhat.rb
serverspec-0.4.13 lib/serverspec/commands/redhat.rb
serverspec-0.4.12 lib/serverspec/commands/redhat.rb