As you have RedHat 9, why do you not look in
/etc/rc.d/rc3.d
to see examples of scripts which are executed when the run level is entered S*, and examples of scripts which are executed when the run level is exited. Note that these are all symbolic links going to files in /etc/rc.d/init.d such that the same script is used for starting up a service and for shutting down by means of a command line parameter.
|