Creating SVR4 style startup/shutdown scripts

Copyright 2002, 2003 Andy Barclay
OpenContent License (OPL)

Overview of the boot sequence in Solaris

Since system administrators are inherently lazy people (I know this because I am one), we don't like to have to rummage around a system trying to find out what directory a startup script is in, nor do we want to have to write separate startup and shutdown scripts for an application.

Given this, the people who designed SVR4 UNIX decided that there should be a common location for application startup scripts and that location should be "/etc/init.d" (/etc/rc.d/init.d on Linux).

Each script is capable of taking a single argument, which can be either "start" or "stop".
Based on the argument passed, the script "does the right thing" to stop or start an application.

Here is the procedure I followed when writing the startup script for the PKC webcrossing daemon