Merge pull request #2525 from millerdev/master

provisioners/salt: make salt bootstrap work on systems without python
This commit is contained in:
Mitchell Hashimoto 2013-11-21 14:56:34 -08:00
commit ccb91ef930
1 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,12 @@
#!/bin/sh - #!/bin/sh -
# We just download the bootstrap script by default and execute that. # We just download the bootstrap script by default and execute that.
python \ if [ -x /usr/bin/fetch ]; then
-c 'import urllib; print urllib.urlopen("http://bootstrap.saltstack.org").read()' \ /usr/bin/fetch -o - http://bootstrap.saltstack.org | sh -s -- "$@"
| sh -s -- "$@" elif [ -x /usr/bin/curl ]; then
/usr/bin/curl -L http://bootstrap.saltstack.org | sh -s -- "$@"
else
python \
-c 'import urllib; print urllib.urlopen("http://bootstrap.saltstack.org").read()' \
| sh -s -- "$@"
fi