Class: VagrantPlugins::GuestQNX::Cap::Halt

Inherits:
Object
  • Object
show all
Defined in:
lib/qnx/vagrant/cap/halt.rb

Class Method Summary collapse

Class Method Details

.halt(machine) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/qnx/vagrant/cap/halt.rb', line 5

def self.halt(machine)
  begin
    machine.communicate.execute("su -c - \"/bin/shutdown -b\"")
  rescue IOError
    # Ignore, this probably means connection closed because it
    # shut down.
  end
end