Quote:
Originally Posted by blowtorch
All service startups in unix are handled by /sbin/rc? scripts. Just replace the ? by the runlevel. In this case, since it will be applications and databases that will be starting up, the startup script is /sbin/rc3. The /sbin/rc3 script in turn calls different scripts in the /sbin/rc3.d directory. You can write the startup scripts for the dbase/app and put it in the /sbin/rc3.d directory.
If you are new to the unix world, you might want to read up on how the HP-UX system boots.
Startup scripts do not belong in the rc<number>.d directories but in the init.d directory.
In the rc<number>.d directories you create links to a script in the init.d directory.
The format of these links is [S|K]NNN<scriptname
In your /sbin/rc3.d directory could have something like:
lrwxr-xr-x 1 root ... S430nfs.client -> /sbin/init.d/nfs.client
S means it will start an application/service
K means it will kill an application/service
NNN decide the order in which applications/services are started/stopped
The /sbin/rc script will start/stop all applications/services mentioned in your rc<number>.d directories. The run level will decide which which directories are covered.
Looking at the S430nfs.client link, the /sbin/rc script will make sure the script /sbin/init.d/nfs.client is executed with as argument "start".
if a link starts with K the corresponding script in /sbin/init.d is executed with argument "stop" .
So, the scripts in /sbin/init.d should have a "start" and "stop" section. Which section will be executing depends on the argument "start" or "stop".
Besides creating the "start links" it is most importing to create the "kill links" as well.
Whenever you shutdown you want your applications/services to be closed in a proper way and not in the rough way cause the system in the end starts to kill all applications/services like that. A "kill -9" on your Oracle processes could cause damage to your database.
For detailed information check the HP-UX documentation