vagrant-lxc-ng/lib/vagrant-lxc/action/boot.rb

23 lines
648 B
Ruby
Raw Normal View History

module Vagrant
module LXC
module Action
2013-03-04 04:09:12 +00:00
# DISCUSS: The Boot action has a different meaning on VB provider and it
# assumes the machine has been started already.
class Boot < BaseAction
def call(env)
config = env[:machine].provider_config
2013-03-04 04:09:12 +00:00
# Allows this middleware to be called multiple times. We need to
# support this as base boxes might have after create scripts which
# require SSH access
unless env[:machine].state.running?
env[:machine].provider.container.start(config)
end
@app.call env
end
end
end
end
end