diff --git a/lib/vagrant-backports/utils.rb b/lib/vagrant-backports/utils.rb index f0de881..096b5fb 100644 --- a/lib/vagrant-backports/utils.rb +++ b/lib/vagrant-backports/utils.rb @@ -4,6 +4,10 @@ module Vagrant def vagrant_1_3_or_later? Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('1.3.0') end + + def vagrant_1_5_or_later? + Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('1.5.0') + end end end end diff --git a/lib/vagrant-lxc/action.rb b/lib/vagrant-lxc/action.rb index d0075e4..d66170e 100644 --- a/lib/vagrant-lxc/action.rb +++ b/lib/vagrant-lxc/action.rb @@ -23,6 +23,9 @@ require 'vagrant-lxc/action/warn_networks' unless Vagrant::Backports.vagrant_1_3_or_later? require 'vagrant-backports/action/wait_for_communicator' end +unless Vagrant::Backports.vagrant_1_5_or_later? + require 'vagrant-backports/action/handle_box' +end module Vagrant module LXC @@ -108,7 +111,7 @@ module Vagrant b.use Builtin::Call, Created do |env, b2| # If the VM is NOT created yet, then do the setup steps if !env[:result] - b2.use Builtin::HandleBoxUrl + b2.use Builtin::HandleBox b2.use HandleBoxMetadata b2.use Create end