Can someone point me to a site that will explain when the K or S links are executed? What relation the /var/lock/subsys/filename have when the K or S links are run? Who manages the /var/lock/subsys/filename directory; e.g. /etc/init.d/filename or S99killall?
Start with "man telinit". (telinit is the command you use to change runlevels, and is hard-linked to init.) Then inspect /etc/inittab. Look at the script /etc/rc.d/rc, which invokes the K and S scripts. Look at /etc/rc.d/init.d/functions, which is a library of common functions available to the initscripts. Use chkconfig or ntsysv to create/destroy the symlinks in the rc.d subdirectories, based on a special shell comment in the script's header.