More than likely the startup shell is too complicated for the busybox shell to handle. Execute the command "export KCSHELL=/opt/bin/bash" within rc.local prior to calling the script so that it will be executed with bash instead.
Alternatively, you could just change the top line of the startup script to be "#!/opt/bin/bash" instead of "#!/bin/sh".
- K.C.