Hot answers tagged openindiana
I don't have a Solaris system to hand but it appears that the script is relying on /bin/sh being a link to /bin/bash and as such is using bash syntax that sh doesn't understand. As you've discovered changing the shebang to #!/bin/bash fixes the problem. You should submit a bug report and hopefully the maintainers will fix it to be less Linux centric.
Only top voted, non community-wiki answers of a minimum length are eligible