From 0e21de9a25edfe56fa996055712d25b7a3345f0d Mon Sep 17 00:00:00 2001
From: "Sean P. Kane" <skane@newrelic.com>
Date: Wed, 7 Aug 2013 09:38:49 -0700
Subject: [PATCH] Assume that if VAGRANT_DEFAULT_PROVIDER is set we shouldn't
 install vbox tools

---
 Vagrantfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Vagrantfile b/Vagrantfile
index aadabb8711..4ff8c6ec14 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -25,7 +25,8 @@ Vagrant::Config.run do |config|
       "apt-get update -qq; apt-get install -q -y linux-image-3.8.0-19-generic; "
     # Add guest additions if local vbox VM
     is_vbox = true
-    ARGV.each do |arg| is_vbox &&= !arg.downcase.start_with?("--provider") end
+    # The logic here makes a few assumptions (i.e. no one uses --provider=virtualbox)
+    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-3.8.0-19-generic dkms; " \
         "echo 'Downloading VBox Guest Additions...'; " \