Class: Specinfra::Command::Redhat::Base::Yumrepo

Inherits:
Linux::Base::Yumrepo show all
Defined in:
lib/specinfra/command/redhat/base/yumrepo.rb

Class Method Summary collapse

Methods inherited from Base

create, escape

Class Method Details

.check_exists(repository) ⇒ Object


3
4
5
# File 'lib/specinfra/command/redhat/base/yumrepo.rb', line 3

def check_exists(repository)
  "yum repolist all -C | grep ^#{escape(repository)}"
end

.check_is_enabled(repository) ⇒ Object


7
8
9
# File 'lib/specinfra/command/redhat/base/yumrepo.rb', line 7

def check_is_enabled(repository)
  "yum repolist enabled -C | grep -qs \"^[\\!\\*]\\?#{escape(repository)}\""
end