Sha256: 3676aeb6c92fe0f89de815c42001ab56c0e26ea9130eaf47cf835d95ce27e309
Contents?: true
Size: 769 Bytes
Versions: 2
Compression:
Stored size: 769 Bytes
Contents
module Serverspec module Commands class RedHat < Linux def check_access_by_user(file, user, access) # Redhat-specific "runuser -c \"test -#{access} #{file}\" #{user}" end def check_enabled(service) "chkconfig --list #{escape(service)} | grep 3:on" end def check_yumrepo(repository) "yum repolist all -C | grep ^#{escape(repository)}" end def check_yumrepo_enabled(repository) "yum repolist all -C | grep ^#{escape(repository)} | grep enabled" end def check_installed(package,version=nil) cmd = "rpm -q #{escape(package)}" if ! version.nil? cmd = "#{cmd} | grep -w -- #{escape(version)}" end cmd end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
serverspec-0.6.12 | lib/serverspec/commands/redhat.rb |
serverspec-0.6.11 | lib/serverspec/commands/redhat.rb |