lib/vagrant-vbguest/installers/linux.rb in vagrant-vbguest-0.7.1 vs lib/vagrant-vbguest/installers/linux.rb in vagrant-vbguest-0.8.0

- old
+ new

@@ -11,22 +11,22 @@ # # @see {Vagrant::Guest::Linux#distro_dispatch} # @return [Symbol] One of `:debian`, `:ubuntu`, `:gentoo`, `:fedora`, `:redhat`, `:suse`, `:arch` def self.distro(vm) @@ditro ||= {} - @@ditro[ VagrantVbguest::Helpers::VmCompatible.vm_id(vm) ] ||= vm.guest.distro_dispatch + @@ditro[ vm_id(vm) ] ||= distro_name vm end # Matches if the operating system name prints "Linux" # Raises an Error if this class is beeing subclassed but # this method was not overridden. This is considered an # error because, subclassed Installers usually indicate # a more specific distributen like 'ubuntu' or 'arch' and # therefore should do a more specific check. def self.match?(vm) raise Error, :_key => :do_not_inherit_match_method if self != Linux - communicate.test("uname | grep 'Linux'") + communicate_to(vm).test("uname | grep 'Linux'") end # defaults the temp path to "/tmp/VBoxGuestAdditions.iso" for all Linux based systems def tmp_path '/tmp/VBoxGuestAdditions.iso' @@ -42,11 +42,11 @@ # @param [Hash] opts Optional options Hash wich meight get passed to {Vagrant::Communication::SSH#execute} and firends # @yield [type, data] Takes a Block like {Vagrant::Communication::Base#execute} for realtime output of the command being executed # @yieldparam [String] type Type of the output, `:stdout`, `:stderr`, etc. # @yieldparam [String] data Data for the given output. def install(opts=nil, &block) - env.ui.warn I18n.t("vagrant.plugins.vbguest.errors.installer.generic_linux_installer") if self.class == Linux + env.ui.warn I18n.t("vagrant_vbguest.errors.installer.generic_linux_installer") if self.class == Linux upload(iso_file) mount_iso(opts, &block) execute_installer(opts, &block) unmount_iso(opts, &block) end @@ -75,10 +75,10 @@ return @guest_version if @guest_version && !reload driver_version = super communicate.sudo('VBoxService --version', :error_check => false) do |type, data| if (v = data.to_s.match(/^(\d+\.\d+.\d+)/)) && driver_version != v[1] - @env.ui.warn(I18n.t("vagrant.plugins.vbguest.guest_version_reports_differ", :driver => driver_version, :service => v[1])) + @env.ui.warn(I18n.t("vagrant_vbguest.guest_version_reports_differ", :driver => driver_version, :service => v[1])) @guest_version = v[1] end end @guest_version end