class Vagrant::LXC::Action::Boot
Public Class Methods
new(app, env)
click to toggle source
# File lib/vagrant-lxc/action/boot.rb, line 5 def initialize(app, env) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-lxc/action/boot.rb, line 9 def call(env) @env = env config = env[:machine].provider_config utsname = env[:machine].config.vm.hostname || env[:machine].id config.customize 'utsname', utsname # Fix apparmor issues when starting Ubuntu 14.04 containers # See https://github.com/fgrehm/vagrant-lxc/issues/278 for more information if Dir.exists?('/sys/fs/pstore') config.customize 'mount.entry', '/sys/fs/pstore sys/fs/pstore none bind,optional 0 0' end env[:ui].info I18n.t("vagrant_lxc.messages.starting") env[:machine].provider.driver.start(config.customizations) @app.call env end