/usr/lib/ruby/vendor_ruby/vagrant/action/general/check_virtualbox.rb is in vagrant 1.0.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | module Vagrant
module Action
module General
# Checks that virtualbox is installed and ready to be used.
class CheckVirtualbox
def initialize(app, env)
@app = app
end
def call(env)
# Certain actions may not actually have a VM, and thus no
# driver, so we have to be clever about obtaining an instance
# of the driver.
driver = nil
driver = env[:vm].driver if env[:vm]
driver = Driver::VirtualBox.new(nil) if !driver
# Verify that it is ready to go! This will raise an exception
# if anything goes wrong.
driver.verify!
# Carry on.
@app.call(env)
end
end
end
end
end
|