Sha256: 7313900d297192c2255ae6cfa7a966ea41c86305f1e01b52d8f6650dec11947b

Contents?: true

Size: 854 Bytes

Versions: 5

Compression:

Stored size: 854 Bytes

Contents

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

          # 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
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-lxc-1.1.0 lib/vagrant-lxc/action/boot.rb
vagrant-lxc-1.0.1 lib/vagrant-lxc/action/boot.rb
vagrant-lxc-1.0.0 lib/vagrant-lxc/action/boot.rb
vagrant-lxc-1.0.0.alpha.3 lib/vagrant-lxc/action/boot.rb
vagrant-lxc-1.0.0.alpha.2 lib/vagrant-lxc/action/boot.rb