HP-UX HB v13.00 Ch-03 - System Startup
HP-UX Handbook – Rev 13.00 Page 10 (of 14)
Chapter 03 System Startup
October 29, 2013
Execution Script Links - /sbin/rc#.d/*
The Execution Script Links are located in the Sequencer (or Run Level) Directories
/sbin/rcN.d/ where N reflects the Run Level. The contents of sequencer directories consist of
symbolic links to startup scripts in /sbin/init.d. These symbolic links must follow a strict
naming convention, as noted in the various fields of this example:
/sbin/rc2.d/S060cron
rc2.d Sequencer (Run Level) Directory:
The sequencer directory is numbered to reflect the run-level for which its contents will
be executed. In this case, Start scripts in this directory will be executed upon entering
run-level 2 from run-level 1, and Kill scripts will be executed upon entering run-level 2
from runlevel 3.
S Sequencing Type:
The first character of a sequencer link name determines whether the script is executed as
a start script (if the character is "S"), or as a kill script (if the character is "K").
060 Sequence Number:
A three digit number is used for sequencing scripts within the sequencer directory.
Scripts are executed by type (start or kill) in lexicographical order. Although it is not
recommended, two scripts may share the same sequence number.
Kill scripts for a start script in directory /sbin/rcN.d will reside in
/sbin/rc(N-1).d. E.g. /sbin/rc3.d/S499homer and /sbin/rc2.d/K501homer might
be execution counterparts.
By convention the sequence numbers of start and kill script sum up to 1000.
cron Script Name:
Following the sequence number is the name of the startup script. This name must be the
same name as the script to which this sequencer entry is linked. In this example, the link
points to /sbin/init.d/cron.
NOTE: UX 10.X still supports short file names (14 or less characters). This means that
the script name field and therefore the Executiopn SCript in /sbin/init.d is limited to
10 or fewer characters.
Scripts are executed in lexicographical order defined by the shell. The entire file name of the link
is used for ordering purposes. When adding new sequencer entries, sequencer numbers are
chosen to allow for gaps so that future entries may be inserted without requiring renumbering of
existing entries. HP-supplied sequencer entries will all have unique numbers.
When ordering start and kill script links, note that subsystems started in any given order should