/usr/lib/ruby/vendor_ruby/vagrant/action/vm/customize.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 29 30 31 32 33 34 35 36 | module Vagrant
module Action
module VM
class Customize
def initialize(app, env)
@app = app
end
def call(env)
customizations = env[:vm].config.vm.customizations
if !customizations.empty?
env[:ui].info I18n.t("vagrant.actions.vm.customize.running")
# Execute each customization command.
customizations.each do |command|
processed_command = command.collect do |arg|
arg = env[:vm].uuid if arg == :id
arg.to_s
end
result = env[:vm].driver.execute_command(processed_command)
if result.exit_code != 0
raise Errors::VMCustomizationFailed, {
:command => processed_command.inspect,
:error => result.stderr
}
end
end
end
@app.call(env)
end
end
end
end
end
|