website: add a troubleshooting section for the shell provisioner

This commit is contained in:
Mark Peek 2013-08-20 14:07:21 -07:00
parent 83d36f90d3
commit ad298abe48
1 changed files with 20 additions and 0 deletions

View File

@ -127,3 +127,23 @@ reboot so that SSH will eventually be killed automatically:
reboot
sleep 60
```
## Troubleshooting
*My shell script doesn't work correctly on Ubuntu*
* On Ubuntu the /bin/sh shell is
[dash](http://en.wikipedia.org/wiki/Debian_Almquist_shell). If your script has
[bash](http://en.wikipedia.org/wiki/Bash_(Unix_shell\)) specific commands in it
then put `#!/bin/bash` at the top of your script. Differences
between dash and bash can be found on the [DashAsBinSh](https://wiki.ubuntu.com/DashAsBinSh) Ubuntu wiki page.
*My shell works when I login but fails with the shell provisioner*
* See the above tip. More than likely your login shell is using /bin/bash
while the provisioner is using /bin/sh.
*How do I tell what my shell script is doing?*
* Adding a `-x` flag to the shebang at the top of the script (`#!/bin/sh -x`)
will echo the script statements as it is executing.