Sha256: 4468df2072e43281d106559d05b690730ba5768d89f4353f64d5081dcb320497

Contents?: true

Size: 1.11 KB

Versions: 12

Compression:

Stored size: 1.11 KB

Contents

module VagrantVbguest
  module Installers
    class OpenSuse < Linux
      # OpenSuse shows up as "suse", check for presence of the zypper
      # package manager as well.
      def self.match?(vm)
        :suse == self.distro(vm) && has_zypper?(vm)
      end

      # Install missing deps and yield up to regular linux installation
      def install(opts=nil, &block)
        communicate.sudo(uninstall_dist_install_cmd, (opts || {}).merge(:error_check => false), &block)
        communicate.sudo(install_dependencies_cmd, opts, &block)
        super
      end

    protected
      def self.has_zypper?(vm)
        communicate_to(vm).test("which zypper")
      end

      def uninstall_dist_install_cmd
        "zypper --non-interactive rm -y virtualbox-guest-kmp-default virtualbox-guest-tools virtualbox-guest-x11"
      end

      def install_dependencies_cmd
        "zypper --non-interactive install -t pattern #{dependencies}"
      end

      def dependencies
        ['devel_C_C++', 'devel_basis', 'devel_kernel'].join(' ')
      end
    end
  end
end
VagrantVbguest::Installer.register(VagrantVbguest::Installers::OpenSuse, 5)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vagrant-vbguest-0.31.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.30.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.29.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.28.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.27.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.26.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.25.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.24.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.24.0.beta1 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.23.0 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.22.1 lib/vagrant-vbguest/installers/opensuse.rb
vagrant-vbguest-0.22.0 lib/vagrant-vbguest/installers/opensuse.rb