matschaffer/knife-solo — pull request #351 by robacarp (2014-02-23 08:01:55+00:00)
Title: explicitly execute bash script in bash

Fix for Issue https://github.com/matschaffer/knife-solo/issues/350

I put the if/else block on one line to give the best possibility of whatever random shell on the client passing the whole command string on to bash. In my testing, csh seems to have the most trouble with multiline strings. I'm not familiar enough with it to know if there is a cleaner way to send the command string through to bash.

I hardcoded /bin/sh as the shell because the opscode install.sh script already depends on /bin/sh.