Sha256: 518f4481e10eeb77e9b08bca58bdd7035e1d13d75a891cc4b1a085d07b7150f2
Contents?: true
Size: 843 Bytes
Versions: 37
Compression:
Stored size: 843 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, level=3) "chkconfig --list #{escape(service)} | grep #{level}: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 cmd = "#{cmd} | grep -w -- #{escape(version)}" end cmd end alias :check_installed_by_rpm :check_installed end end end
Version data entries
37 entries across 37 versions & 1 rubygems