How to set up legacy services right on Solaris 10

I want to add auto startup and shutdown script to Solaris 10's legacy services as they run in Solaris 9 or in Linux.

To make this work, I created the crontrol script in /etc/init.d/dbora as root user.Then link it to /etc/rc0.d and /etc/rc2.d directories. rc0.d is for shutdown and rc2.d is for srat. After I reboot the Solaris 10 box, I went to /var/svc/log directory to check these log files: milestone-multi-user:default.log, rec5.log and so on. I have found that shutdown part in control script worked. But the startup part in the control script didn't work. The message was like: Excuting legacy init script "/etc/rc2.d/S99dbora", Oracle Startup: cannot start. In the next line, log file told me this: legacy init script "/etc/rc2.d/S99dbora" exited with return code 0. Why the second part of code in the same script worked (shutdown) and the first part (startup) didn't work? What is wrong on my settings?

Here are more for your information. I tested command as root like this: /etc/rc2.d/S99dbora start, returning message is: Oracle startup: cnanot start. Because system current run level is 3, so I linked dbora script to rc3.d as S99dbora and tested as /etc/rc3.d/S99dbora start. I got the same message: Oracle startup: cannot start.

Anyone who know about this, please give me some advice. Thank you very much in advance.

Message was edited by:

duke0001

[1403 byte] By [duke0001a] at [2007-11-26 14:08:06]
# 1
you likely needed to use su -c oracle in your script, since the database must be started as user oracle.
unixman99a at 2007-7-8 1:54:35 > top of Java-index,Solaris Operating System,Solaris 10 Features...