class VagrantVbguest::Installers::OpenSuse

Public Class Methods

match?(vm) click to toggle source

OpenSuse shows up as “suse”, check for presence of the zypper package manager as well.

# File lib/vagrant-vbguest/installers/opensuse.rb, line 6
def self.match?(vm)
  :suse == self.distro(vm) && has_zypper?(vm)
end

Protected Class Methods

has_zypper?(vm) click to toggle source
# File lib/vagrant-vbguest/installers/opensuse.rb, line 17
def self.has_zypper?(vm)
  communicate_to(vm).test("which zypper")
end

Public Instance Methods

install(opts=nil, &block) click to toggle source

Install missing deps and yield up to regular linux installation

# File lib/vagrant-vbguest/installers/opensuse.rb, line 11
def install(opts=nil, &block)
  communicate.sudo(install_dependencies_cmd, opts, &block)
  super
end

Protected Instance Methods

dependencies() click to toggle source
# File lib/vagrant-vbguest/installers/opensuse.rb, line 25
def dependencies
  ['devel_C_C++', 'devel_basis', 'devel_kernel'].join(' ')
end
install_dependencies_cmd() click to toggle source
# File lib/vagrant-vbguest/installers/opensuse.rb, line 21
def install_dependencies_cmd
  "zypper --non-interactive install -t pattern #{dependencies}"
end