vagrant/plugins/guests/solaris/cap/halt.rb

23 lines
650 B
Ruby
Raw Normal View History

2013-04-04 19:25:10 +00:00
module VagrantPlugins
module GuestSolaris
module Cap
class Halt
def self.halt(machine)
# There should be an exception raised if the line
#
# vagrant::::profiles=Primary Administrator
#
# does not exist in /etc/user_attr. TODO
begin
machine.communicate.execute(
"#{machine.config.solaris.suexec_cmd} /usr/sbin/shutdown -y -i5 -g0")
rescue IOError, Vagrant::Errors::SSHDisconnected
2013-04-04 19:25:10 +00:00
# Ignore, this probably means connection closed because it
# shut down.
end
end
end
end
end
end