Changing scripts in /etc/rc2.d
Upon entering init state 2 (multiuser mode) from
either a higher init state (3-6) or from single-user mode,
init executes the /etc/rc2
script according to the instructions in /etc/inittab.
The rc2 script sets certain environment variables
and runs scripts in the /etc/rc2.d directory.
Some of the scripts in rc2.d run scripts in
subdirectories of the rc.d directory.
This section describes the scripts in the /etc/rc2.d directory that are run by rc2 and explains the steps for adding your own script. The rc2(ADM) manual page describes the other scripts that rc2 runs.
Table A-5 gives a brief description of some of the scripts in /etc/rc2.d.
---------------------------------------------------
Script Description
---------------------------------------------------
S00MDAC starts Mylex disk array monitor
P00SYSINIT starts kernel message logger
S00VDISK configures virtual disk arrays
I01MOUNTFSYS mounts filesystems specified in
/etc/default/filesys
P03RECOVERY tidies up vi editing sessions after
a crash
P04CLEAN removes temporary files
P05RMTMPFILES removes temporary files
P15HWDNLOAD downloads hardware
P16KERNINIT starts, process accounting,
network, and other kernel
initialization
P20sysetup configures print system and
generates /etc/systemid
P21perf starts system accounting
S25pm starts power management event
routing and servicing daemon
S35dlpi configures the network card driver
interface
P70uucp cleans up UUCP lock files
P75cron starts cron daemon
S80lp starts lpsched and net utilities
S85tcp starts TCP/IP, name service, and
routing
P86mmdf starts mmdf deliver daemon
P86scologin starts scologin
P87USRDAEMON starts user daemons
P88USRDEFINE executes user-definable commands
after boot
S89hostmib starts host MIB service
S89nfs starts NFS service
P90RESERVED mails fsck output saved during
autoboot to root
S93scohttpd starts SCOhelp daemon
S95calserver starts calendar daemon
S99apcssd starts UPS port monitor
The /etc/rc2.d directory on your system may contain
scripts other than the ones listed in the table.
This is because during installation,
many add-on programs insert their own daemon-initialization
scripts in this directory.
This directory may also include scripts that clean up the
temporary or lock files for an add-on program.
You can write your own scripts to run when the system enters init state 2. For example, you can write a script that sets up a RAM disk or starts a network and add it to /etc/rc2.d.
The following factors should be considered when writing a system startup script to be placed in rc2.d :
Table A-6 gives, in sort-sequence order (left to right), the ASCII characters that are valid for naming files.
Table A-6 Valid filename characters
------------------------------------------------------- | # | % | + | , | - | .| 0 | 1 | 2 | 3| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | 4 | 5 | 6 | 7 | 8 | 9| : | = | ? | @| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | A | B | C | D | E | F| G | H | I | J| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | K | L | M | N | O | P| Q | R | S | T| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | U | V | W | X | Y | Z| ^ | _ | a | b| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | c | d | e | f | g | h| i | j | k | l| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | m | n | o | p | q | r| s | t | u | v| |----|-----|-----|-----|-----|---|-----|-----|-----|---| | w | x | y | | | | | | | | |----|-----|-----|-----|-----|---|-----|-----|-----|---|
Note that a set of scripts whose names start with P77, P78, and P79 will be executed concurrently. S80lp will not start until they have all exited.