Startup script freezes Beagleboard

Hello,

I am developing some application for the beagleboard, and I want it to
start up automatically everytime I turn the beagleboard on. This
shouldnt be very hard, but the BB freezes out everytime it runs the
script.

The Script is something like this: