Installation guide

cron kmod nfs recpasswd settime xdm
enlogin lat nfsmount rmtmpfiles sia xntpd
gateway loader nis route snmpd
inet lpd paging rwho startlmf
4.1.2.2 The rc0.d Directory and rc0 Run Command Script
The /sbin/rc0 script contains run commands that enable a smooth
shutdown and bring the system to either a halt state or single-user mode.
As described previously, the inittab file contains entries that the init
program reads and acts on when the system is shutting down to single-user
mode (level s) or halting (level 0). For example:
ss:Ss:wait:/sbin/rc0 shutdown < /dev/console > /dev/console 2>&1
s0:0:wait:/sbin/rc0 off < /dev/console > /dev/console 2>&1
Notice that in both cases, the rc0 script is the specified command. In
addition to commands listed in the script itself, rc0 contains instructions
to run commands found in the /sbin/rc0.d directory. These commands
are linked to files in the init.d directory. The script defines the conditions
under which the commands execute; some commands run if the system is
being halted while others run if the system is being shut down and
rebooted to single-user mode.
By convention, files in the /sbin/rc0.d directory begin with either the
letter "K" or the letter "S" and are followed by a 2-digit number and a file
name. For example, a long listing of the rc0.d directory contents would
look similar to the following:
lrwxr-xr-x 1 root staff 17 Jan 04 10:31 K00enlogin -> ../init.d/enlogin
lrwxr-xr-x 1 root staff 13 Jan 04 10:44 K05lpd -> ../init.d/lpd
lrwxr-xr-x 1 root staff 13 Jan 04 10:51 K07lat -> ../init.d/lat
lrwxr-xr-x 1 root staff 15 Jan 04 10:37 K10inetd -> ../init.d/inetd
lrwxr-xr-x 1 root staff 15 Jan 04 10:37 K15snmpd -> ../init.d/snmpd
lrwxr-xr-x 1 root staff 13 Jan 04 10:31 K19xdm -> ../init.d/xdm
lrwxr-xr-x 1 root staff 15 Jan 04 10:37 K20xntpd -> ../init.d/xntpd
lrwxr-xr-x 1 root staff 14 Jan 04 10:31 K22cron -> ../init.d/cron
lrwxr-xr-x 1 root staff 18 Jan 04 10:31 K25sendmail -> ../init.d/sendmail
lrwxr-xr-x 1 root staff 13 Jan 04 10:41 K30nfs -> ../init.d/nfs
lrwxr-xr-x 1 root staff 18 Jan 04 10:41 K35nfsmount -> ../init.d/nfsmount
lrwxr-xr-x 1 root staff 13 Jan 04 10:37 K38nis -> ../init.d/nis
lrwxr-xr-x 1 root staff 15 Jan 04 10:41 K40named -> ../init.d/named
lrwxr-xr-x 1 root staff 14 Jan 04 10:37 K42rwho -> ../init.d/rwho
lrwxr-xr-x 1 root staff 15 Jan 04 10:37 K43route -> ../init.d/route
lrwxr-xr-x 1 root staff 17 Jan 04 10:37 K44gateway -> ../init.d/gateway
lrwxr-xr-x 1 root staff 16 Jan 04 10:31 K45syslog -> ../init.d/syslog
lrwxr-xr-x 1 root staff 14 Jan 04 10:52 K46uucp -> ../init.d/uucp
lrwxr-xr-x 1 root staff 14 Jan 04 10:37 K50inet -> ../init.d/inet
lrwxr-xr-x 1 root staff 15 Jan 04 10:31 K52quota -> ../init.d/quota
In general, the system starts commands that begin with the letter "S" and
stops commands that begin with the letter "K." The numbering of
commands in the /sbin/rc0.d directory is important since the numbers
are sorted and the commands are run in ascending order.
4–10 Customizing the System Environment