previous contents up next

Unix for Advanced Users

14. The Shutdown Sequence

14.3. The Shutdown Scripts

Like startup scripts, the system initialization directories (usually /etc/rcN.d) contains shutdown scripts which are fired up by init during an orderly shutdown (i.e. when either the init command is used to change the runlevel or when the shutdown command is used).

The usual convention is to use the letter K in front of a number, followed by a service name, such as K56network. The number determines the order in which the scripts are fired up when the system transitions into a particular run level.

Take a look at the directories rc1.d, rc2.d, etc. in the directory /etc/rc.d on your Linux box to find the shutdown scripts.

previous contents up next