Sha256: 67744543bac67a55f7b10522a4abdf7292ed1f1f2b9cba4da80698dc04ed546a

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 Bytes

Contents

module VagrantPlugins
  module GuestWindows
    module Cap
      class Reboot
        def self.wait_for_reboot(machine)
          return if machine.config.vm.communicator != :ssh
          
          script  = File.expand_path("../../scripts/reboot_detect.ps1", __FILE__)
          script  = File.read(script)
          while machine.communicate.execute(script, error_check: false) != 0
            sleep 10
          end

          # This re-establishes our symbolic links if they were
          # created between now and a reboot
          machine.communicate.execute("net use", error_check: false)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-guest-msys2-0.0.6 lib/vagrant-guest-msys2/cap/reboot.rb
vagrant-guest-msys2-0.0.5 lib/vagrant-guest-msys2/cap/reboot.rb
vagrant-guest-msys2-0.0.4 lib/vagrant-guest-msys2/cap/reboot.rb