From 1c2929cd840d82dc49f0d025397cf450ad10625b Mon Sep 17 00:00:00 2001 From: Graham Clinch Date: Tue, 9 Jan 2018 16:01:50 +0000 Subject: [PATCH 1/2] Change to a temporary directory before downloading script files, to avoid leaving junk files in the working directory (probably ~vagrant) --- plugins/provisioners/salt/bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/provisioners/salt/bootstrap-salt.sh b/plugins/provisioners/salt/bootstrap-salt.sh index 410acc24c..702aff489 100755 --- a/plugins/provisioners/salt/bootstrap-salt.sh +++ b/plugins/provisioners/salt/bootstrap-salt.sh @@ -1,5 +1,7 @@ #!/bin/sh - +cd `mktemp --directory` + # We just download the bootstrap script by default and execute that. if [ -x /usr/bin/fetch ]; then /usr/bin/fetch -o bootstrap-salt.sh https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh From b384361cd246c4912413f2a613362320569c46a1 Mon Sep 17 00:00:00 2001 From: Graham Clinch Date: Tue, 9 Jan 2018 17:58:20 +0000 Subject: [PATCH 2/2] Use the short flag for better cross-platform support --- plugins/provisioners/salt/bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/provisioners/salt/bootstrap-salt.sh b/plugins/provisioners/salt/bootstrap-salt.sh index 702aff489..44d7b3989 100755 --- a/plugins/provisioners/salt/bootstrap-salt.sh +++ b/plugins/provisioners/salt/bootstrap-salt.sh @@ -1,6 +1,6 @@ #!/bin/sh - -cd `mktemp --directory` +cd `mktemp -d` # We just download the bootstrap script by default and execute that. if [ -x /usr/bin/fetch ]; then