English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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 <
echo "Starting up the database `date`"

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

sqlplus < / as sysdba
startup
DBAEOF

sleep 30

echo "Done with DB"

ORAEOF

su - testmgr <
/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?

2007-10-19 01:38:28 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

Unix is the original multi-tasking software. Other systems you might have to program things specifically to say "dont wait until this is done to do the next thing" but on Unix you have to specifically tell it if you want "wait for job to finish"

You need to add a "test" for successful return of the job before the one that goes background

2007-10-22 04:33:47 · answer #1 · answered by Gandalf Parker 7 · 0 0

fedest.com, questions and answers