Skip to content
Snippets Groups Projects
Commit b45c120f authored by Volker Hilsheimer's avatar Volker Hilsheimer
Browse files

Name shell provisioners to avoid conflicts

Names and upload paths avoid that several provisioners end up
being /tmp/vagrant_shell
parent efd24824
No related branches found
No related tags found
No related merge requests found
...@@ -456,6 +456,7 @@ def sshfs_share_folder(box, host_path, guest_path) ...@@ -456,6 +456,7 @@ def sshfs_share_folder(box, host_path, guest_path)
upload_path = "/tmp/vagrant-shell/#{guest_base}_mount" upload_path = "/tmp/vagrant-shell/#{guest_base}_mount"
mount_command = { mount_command = {
privileged: false, privileged: false,
name: "sshfs_mount",
upload_path: "#{upload_path}.sh", upload_path: "#{upload_path}.sh",
inline: \ inline: \
"if [[ ! -d #{mount_point} ]]; then " \ "if [[ ! -d #{mount_point} ]]; then " \
...@@ -587,6 +588,7 @@ def win_link_folders(box) ...@@ -587,6 +588,7 @@ def win_link_folders(box)
SCRIPT SCRIPT
box.vm.provision "shell", box.vm.provision "shell",
name: "win_link_folders",
inline: link_cmd inline: link_cmd
end end
......
...@@ -3,5 +3,12 @@ def script_provision(vm, args) ...@@ -3,5 +3,12 @@ def script_provision(vm, args)
if !script.is_a?(String) if !script.is_a?(String)
throw "Argument error: expecting a 'script' string" throw "Argument error: expecting a 'script' string"
end end
vm.provision "shell", inline:args["script"] upload_path = "/tmp/vagrant-shell/script_provisioning.sh"
if vm.guest == :windows
upload_path = "c:\\Windows\\temp\\script_provisioning.ps1"
end
vm.provision "shell",
name: "script_provisioning",
upload_path: upload_path,
inline:args["script"]
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment