Sha256: 77911c52a8324875193fcb6acd31861bccae527762ecfa680b739c1a6242ebe3

Contents?: true

Size: 492 Bytes

Versions: 21

Compression:

Stored size: 492 Bytes

Contents

module Vagrant
  module Guest
    class OpenBSD < Base
      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
    end
  end
end

Version data entries

21 entries across 21 versions & 6 rubygems

Version Path
vagrant-1.0.1 lib/vagrant/guest/openbsd.rb