11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/vagrant-vbguest/helpers.rb', line 11
def reboot(vm, options)
run_reboot = if rebooted?(vm)
vm.env.ui.error(I18n.t("vagrant.plugins.vbguest.restart_loop_guard_activated"))
false
elsif options[:auto_reboot]
vm.env.ui.warn(I18n.t("vagrant.plugins.vbguest.restart_vm"))
@@rebooted[ VmCompatible.vm_id(vm) ] = true
else
vm.env.ui.warn(I18n.t("vagrant.plugins.vbguest.suggest_restart", :name => vm.name))
false
end
return unless run_reboot
if Vagrant::VERSION < '1.1.0'
vm.reload(options)
else
vm.action(:reload, options)
end
end
|