vagrant-lxc-ng/lib/vagrant-lxc/action/boot.rb
2014-03-13 23:07:05 -03:00

25 lines
542 B
Ruby

module Vagrant
module LXC
module Action
class Boot
def initialize(app, env)
@app = app
end
def call(env)
@env = env
config = env[:machine].provider_config
utsname = env[:machine].config.vm.hostname || env[:machine].id
config.customize 'utsname', utsname
env[:ui].info I18n.t("vagrant_lxc.messages.starting")
env[:machine].provider.driver.start(config.customizations)
@app.call env
end
end
end
end
end