Tim Schumacher fbffb41fc4 guests: Add unmodified alpine support plugin from maier
This has been available as `vagrant-alpine` in the plugin
repository so far.
2019-07-18 03:35:40 +02:00

22 lines
507 B
Ruby

# rubocop:disable Style/RedundantBegin
# rubocop:disable Lint/HandleExceptions
#
# FIXME: address disabled warnings
#
module VagrantPlugins
module GuestAlpine
module Cap
class Halt
def self.halt(machine)
begin
machine.communicate.sudo('poweroff')
rescue Net::SSH::Disconnect, IOError
# Ignore, this probably means connection closed because it
# shut down and SSHd was stopped.
end
end
end
end
end
end