Remove old /tmp/bootstrap_salt.sh before uploading as it may not be writeable

This commit is contained in:
Ian Heggie 2013-09-29 21:05:59 +10:00
parent c8534dc407
commit 4f11716633
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ module VagrantPlugins
bootstrap_path = get_bootstrap bootstrap_path = get_bootstrap
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh") bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
@machine.communicate.sudo("rm -f %s" % bootstrap_destination)
@machine.communicate.upload(bootstrap_path.to_s, bootstrap_destination) @machine.communicate.upload(bootstrap_path.to_s, bootstrap_destination)
@machine.communicate.sudo("chmod +x %s" % bootstrap_destination) @machine.communicate.sudo("chmod +x %s" % bootstrap_destination)
bootstrap = @machine.communicate.sudo("%s %s" % [bootstrap_destination, options]) do |type, data| bootstrap = @machine.communicate.sudo("%s %s" % [bootstrap_destination, options]) do |type, data|