Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Startup Script

Status
Not open for further replies.

vg2511

IS-IT--Management
Dec 17, 2005
16
US
We have a startup script on one of our Solaris servers and it boots and shuts down our environment for one of our application using oracle.

This morning when the server was booted up, it did not start,

My Platform specialist says that it didn’t start because it is a KSH script instead of a SH startup script.

What are the changes need to comply with him.

Here is the script in question :

#!/bin/ksh
hostName=`/usr/ucb/hostname`

case $1 in
start)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot ostl235' & > /tmp/dbproc_235`date +"%m%d"`_err 2>&1 ;;

psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/test/cur/adm
in/bin/dbproc.boot opwk33' & > /tmp/dbproc_33`date +"%m%d"`_err 2>&1 ;;

fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c 'nohup /appl/solid/prod/cur/adm
in/bin/dbproc.boot ofar15' & > /tmp/dbproc_15`date +"%m%d"`_err 2>&1 ;;

esac ;;

stop)
case $hostName in
csdsolid)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown ostl235' > /tmp/dbproc_235`date +"$m%d"`_err 2>&1 ;;

psdev09)
. /appl/solid/test/sdreport/.profile
su - sdreport -c '/appl/solid/test/cur/admin/bin
/dbproc.shutdown opwk33' > /tmp/dbproc_33`date +"$m%d"`_err 2>&1 ;;

fsp8015a|ssp8002a)
. /appl/solid/prod/sdreport/.profile
su - sdreport -c '/appl/solid/prod/cur/admin/bin
/dbproc.shutdown ofar15' > /tmp/dbproc_15`date +"$m%d"`_err 2>&1 ;;

esac ;;

*)
echo "Usage: /etc/init.d/dbproc {start|stop}" ;;

esac

Thanks to all the nice samaritans.
 
If this is the first time this has happened, and the script has worked perfectly well previously, I think I'd be asking my 'Platform specialist' to use his specialist skills to diagnose exactly why it didn't work.
 
Try changing the line to #!/bin/ksh -x and run it from the command line and see if it works or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top