CentOS uses bash as it's /bin/sh, while Ubuntu uses dash as it's /bin/sh. So it's a fair bet that there's a bash-ism in that script somewhere. Change the first line to "#!/bin/bash" and see if it...