mirror of https://github.com/docker/docs.git
Don't install VirtualBox Guest Additions if VAGRANT_DEFAULT_PROVIDER is set.
This commit is contained in:
parent
3a6868bc2f
commit
28e75b23b3
|
@ -22,11 +22,8 @@ Vagrant::Config.run do |config|
|
||||||
# Add Ubuntu raring backported kernel
|
# Add Ubuntu raring backported kernel
|
||||||
pkg_cmd << "apt-get update -qq; apt-get install -q -y linux-image-generic-lts-raring; "
|
pkg_cmd << "apt-get update -qq; apt-get install -q -y linux-image-generic-lts-raring; "
|
||||||
# Add guest additions if local vbox VM
|
# Add guest additions if local vbox VM
|
||||||
is_vbox = true
|
if ENV["VAGRANT_DEFAULT_PROVIDER"].nil? && ARGV.none? { |arg| arg.downcase.start_with?("--provider") }
|
||||||
# The logic here makes a few assumptions (i.e. no one uses --provider=virtualbox)
|
pkg_cmd << "apt-get install -q -y linux-headers-3.8.0-19-generic dkms; " \
|
||||||
ARGV.each do |arg| is_vbox &&= ( !arg.downcase.start_with?("--provider") && !ENV['VAGRANT_DEFAULT_PROVIDER'] )end
|
|
||||||
if is_vbox
|
|
||||||
pkg_cmd << "apt-get install -q -y linux-headers-generic-lts-raring dkms; " \
|
|
||||||
"echo 'Downloading VBox Guest Additions...'; " \
|
"echo 'Downloading VBox Guest Additions...'; " \
|
||||||
"wget -q http://dlc.sun.com.edgesuite.net/virtualbox/4.2.12/VBoxGuestAdditions_4.2.12.iso; "
|
"wget -q http://dlc.sun.com.edgesuite.net/virtualbox/4.2.12/VBoxGuestAdditions_4.2.12.iso; "
|
||||||
# Prepare the VM to add guest additions after reboot
|
# Prepare the VM to add guest additions after reboot
|
||||||
|
|
Loading…
Reference in New Issue