2013-03-03 05:24:05 +00:00
|
|
|
module Vagrant
|
|
|
|
module LXC
|
|
|
|
module Action
|
2013-04-02 00:05:19 +00:00
|
|
|
class Boot
|
|
|
|
def initialize(app, env)
|
|
|
|
@app = app
|
|
|
|
end
|
|
|
|
|
2013-03-03 05:24:05 +00:00
|
|
|
def call(env)
|
2013-03-11 03:12:01 +00:00
|
|
|
@env = env
|
|
|
|
|
2013-03-03 07:37:07 +00:00
|
|
|
config = env[:machine].provider_config
|
2013-03-04 04:09:12 +00:00
|
|
|
|
2014-03-14 02:07:05 +00:00
|
|
|
utsname = env[:machine].config.vm.hostname || env[:machine].id
|
|
|
|
config.customize 'utsname', utsname
|
2013-06-06 03:03:37 +00:00
|
|
|
|
2013-04-18 06:19:43 +00:00
|
|
|
env[:ui].info I18n.t("vagrant_lxc.messages.starting")
|
2013-04-10 02:33:30 +00:00
|
|
|
env[:machine].provider.driver.start(config.customizations)
|
2013-03-04 04:09:12 +00:00
|
|
|
|
2013-03-03 05:24:05 +00:00
|
|
|
@app.call env
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|