Module: FreeBSD::Pkg
Instance Attribute Summary
Attributes included from Beaker::CommandFactory
Instance Method Summary collapse
- #check_for_package(name, opts = {}) ⇒ Object
- #install_package(name, cmdline_args = nil, opts = {}) ⇒ Object
Methods included from Beaker::CommandFactory
Instance Method Details
#check_for_package(name, opts = {}) ⇒ Object
9 10 11 |
# File 'lib/beaker/host/freebsd/pkg.rb', line 9 def check_for_package(name, opts = {}) execute("pkg info #{name}", opts) { |result| result } end |
#install_package(name, cmdline_args = nil, opts = {}) ⇒ Object
4 5 6 7 |
# File 'lib/beaker/host/freebsd/pkg.rb', line 4 def install_package(name, cmdline_args = nil, opts = {}) cmdline_args ||= '-y' execute("pkg install #{cmdline_args} #{name}", opts) { |result| result } end |