Linux Init Scripts Beware, this model differs in important points from Solaris. The normal /etc/rc?.d/* scripts are executed by /etc/init.d/rc (which is invoked by init via /etc/inittab config). /etc/rc.d is just a sym link to /etc/init.d. Too bad /etc/init.d/ does not just home init scripts like on Solaris :(. This file does not describe how to "set up" and manage init scripts ("chkconfig", "insserv", etc.). That is another level of complexity which is much simpler and is independent from the runtime algorithms described here. Every /etc/rc.d/rc?.d directory has all scripts that need to be run for that level. /etc/init.d/rc.d will compare to the "previous" level to check whether S or K scripts may be skipped. (For normal startup or shutdown, we are going from a runnable level (2,3,5) to/from no level (N), so all of the S or K levels from the runnable level will be executed. This is the meaning of "previous" and "current" level reported by "runlevel". REBOOTING On way DOWN, only the K scripts from current level are run + rc[06].d/S*. Levels 0 (halt) and 6 (reboot) have no K scripts, since the system is stopped after the S scripts run. The only S script run at both of these is the "halt" script. On way UP, only /etc/init.d/boot is executed (directly by init, see inittab) + S scripts from new level. These execute /etc/rc.d/boot.d/*. IDIOSYNCRACIES Docs and behavior are EXTREMELY AMBIGUOS re. runlevel S and 1. /etc/rc.d/README says that runlevel 1 is only for transitioning from a higher level to S. If that is the case, then there is no need for K* scripts (for same reason that levels 0 and 6 have no K scripts). Runlevel S seems to be unstable on SuSE. Can't exit from S without messages indicating state problems. Runlevel 1 seems to be stable, but docs say it shouldn't be used (see previous paragraph), and it does too much for real trouble-shooting/recovery purposes (e.g., loads all normal filesystems). /etc/rc.d/boot.d/K* seem to never run (rememeber that these are executed by /etc/init.d/boot, not by /etc/init.d/rc). OFF-TOPIC The "insserv" system really sucks. The whole goal is to make init script dependencies easy to manage and intuitive. It fails those goals completely and is extremely ambiguous. Most critically, the definition, purpose, and correct usage of the keywords isn't documented anywhere at all that I can find, and is completely not covered by the "insserv" init script nor Suse's /etc/init.d/skeleton*, or /etc/init.d/README. What is the difference between "boot_facility" and "System Facilities"? The "$..." facilities are pesueo-facilities. The available pseudo-facilities are listed at /etc/init.d/skeleton. The $ meaning here seems to have nothing in common with the $ directives in /etc/insserv.conf. The man page says the "X-Start-Before" means that the service "should be started before...". What the hell is the difference between that and ""Should-Start"? If Should-Start means the service that this script "should start", then how does that differ from "Provides"? What is the behavior when a required service is not present? The insserv mentions talks about a "+" optional keyword in the context of "system facilities", but doesn't say nearly enough to figure out how or where to use it. "service" just invokes init scripts with a clean environment. insserv use "insserv -d" to add init scripts instead of chkconfig. chkconfig is just a wrapper and apparently emulates some more generally known/available command than Suse's native 'insserv'. *-Start: Makes the earliest S scripts possible, while ensuring that Required-Start and Should-Start (if present) are started before. With no Stop-* directives at all, this will also make K* scripts as at LATE as possible, while ensuring that *-Starts are stopped after. *-Stop: Seems to have no effect at all on Suse systems. Does not work as documented in /etc/init.d/skeleton.