Class: Vagrant::Guest::OpenBSD
- Defined in:
- lib/vagrant/guest/openbsd.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#change_host_name, #configure_networks, #distro_dispatch, #initialize, #mount_nfs, #mount_shared_folder
Constructor Details
This class inherits a constructor from Vagrant::Guest::Base
Instance Method Details
#halt ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant/guest/openbsd.rb', line 4 def halt vm.channel.sudo("shutdown -p -h now") # Wait until the VM's state is actually powered off. If this doesn't # occur within a reasonable amount of time then simply return which # will cause Vagrant to force kill the machine. count = 0 while vm.state != :poweroff count += 1 return if count >= 30 sleep 1 end end |