vagrant-lxc-ng/lib/vagrant-lxc/action/boot.rb
2013-03-04 01:09:12 -03:00

22 lines
648 B
Ruby

module Vagrant
module LXC
module Action
# 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
# 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