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