SysV notes

Meaning of the rcX.d files (rc3.d)

Files are linked from the /etc/rc.d/init.d/script location into the appropriate runlevel directory. Run levels are listed in /etc/inittab.

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)

Basically, when RedHat boots up, it picks one of these directories (rc[runlevel].d) to decide which services to start (or stop - when switch runlevels). The default runlevel is set in the /etc/inittab file. If a file is linked with a S##name (eg S45sap), the script is run with a start command. If, on the other hand, the file is named wth a K45name format, the script is run with a stop command.