Mark Peek d5dcf84d62 Allow the FreeBSD plugin to install without bash [GH-2485]
The default shell is "bash -l" which does not get installed by default
on FreeBSD. This change allows the plugin to override the default shell
and use a known installed shell (sh).
2013-11-22 15:30:12 -08:00

17 lines
402 B
Ruby

module VagrantPlugins
module GuestFreeBSD
module Cap
class Halt
def self.halt(machine)
begin
machine.communicate.sudo("shutdown -p now", {:shell => "sh"})
rescue IOError
# Do nothing because SSH connection closed and it probably
# means the VM just shut down really fast.
end
end
end
end
end
end