I have a script (run as root) that then logs in as a user (oracle) to start up the database on the server. Then logs in as another user (testmgr) to load up the oracle application server on the box.

The script is:
#!/usr/bin/sh -v

su – oracle <<ORAEOF

echo "Starting up the database `date`"

. /m/net/2/oracle/etdb/9.2.0/et_epsilon.env

sqlplus <<DBAEOF
/ as sysdba
startup
DBAEOF

sleep 30

echo "Done with DB"

ORAEOF

su – testmgr <<MGREOF

/m/net/2/oraapps/etcomn/admin/scripts/et_epsilon/adstrtal.sh apps/apps

sleep 60

MGREOF

I get the Suspended (tty output) right after it prints out "Done with DB"
If I type "fg" then it runs properly.

I've run out of ideas… anyone got solutions?