Sha256: be2555c58f9f9c3da554514c94dafcb794d1db8ef9a155c6deb7173c621d4aae

Contents?: true

Size: 415 Bytes

Versions: 12

Compression:

Stored size: 415 Bytes

Contents

module Serverspec
  module Commands
    class RedHat < Linux
      def check_access_by_user file, user, access
        # Redhat-specific
        "runuser -s /bin/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

12 entries across 12 versions & 1 rubygems

Version Path
serverspec-0.4.7 lib/serverspec/commands/redhat.rb
serverspec-0.4.6 lib/serverspec/commands/redhat.rb
serverspec-0.4.5 lib/serverspec/commands/redhat.rb
serverspec-0.4.4 lib/serverspec/commands/redhat.rb
serverspec-0.4.3 lib/serverspec/commands/redhat.rb
serverspec-0.4.2 lib/serverspec/commands/redhat.rb
serverspec-0.4.1 lib/serverspec/commands/redhat.rb
serverspec-0.4.0 lib/serverspec/commands/redhat.rb
serverspec-0.3.2 lib/serverspec/commands/redhat.rb
serverspec-0.3.1 lib/serverspec/commands/redhat.rb
serverspec-0.3.0 lib/serverspec/commands/redhat.rb
serverspec-0.2.28 lib/serverspec/commands/redhat.rb