The Solaris software provides a detailed series of run control
(rc
) scripts to control run-level changes. Each run level
has an associated rc
script that is located in the /sbin
directory:
rc0
rc1
rc2
rc3
rc5
rc6
rcS
For each rc
script in the /sbin
directory,
there is a corresponding directory named /etc/rc
n
.d
that contains scripts to perform various
actions for that run level. For example, /etc/rc2.d
contains
files that are used to start and stop processes for run level 2.
# ls /etc/rc2.d
K03samba S42ncakmod S81dodatadm.udaplt
K05volmgt S47pppd S89PRESERVE
K06mipagent S65ipfboot S89bdconfig
K07dmi S69mrouted S90wbem
K07snmpdx S70sckm S93cacheos.finish
K16apache S70uucp S94ncalogd
K27boot.server S72autoinstall S95ncad
README S73cachefs.daemon S95networker
S10lu S75savecore S98deallocate
S20sysetup S80lp S99audit
S40llc2 S80spc
The /etc/rc
n
.d
scripts
are always run in ASCII sort order. The scripts have names of the form:
[KS][0-9][0-9]*
Files that begin with K
are run to terminate (kill)
a system service. Files that begin with S
are run to start
a system service.
Run control scripts are located in the /etc/init.d
directory.
These files are linked to corresponding run control scripts in the /etc/rc
n
.d
directories.
The actions of each run control script are summarized in the following section.
The following sections summarize the run control scripts that are used to start and stop system services when you change run levels.
The /sbin/rc0
script runs the /etc/rc0.d
scripts to perform the following tasks:
Stops system services and daemons
Terminates all running processes
Unmounts all file systems
The /sbin/rc1
script runs the /etc/rc1.d
scripts to perform the following tasks:
Stops system services and daemons
Terminates all running user processes
Unmounts all remote file systems
Mounts all local file systems if the previous run level was S
The /sbin/rc2
script runs the /etc/rc2.d
scripts to perform the following tasks, grouped by function:
Local system-related tasks:
Starts system accounting and system auditing, if configured
Sets the default scheduling class if the /etc/dispadmin.conf
file exists
Configures serial device stream
Configures WBEM services
Network service or security-related tasks:
Starts the logical link controller (llc2), if configured
Configures the Solaris Network Cache and Accelerator (NCA) and NCA logging, if appropriate
Starts the Solaris PPP server or client daemons (pppoed or pppd), if configured
Starts directory server (slapd) daemon, if configured
Configures system resource controls and system pools if the /etc/rctladm.conf
and /etc/pooladm.conf
files
exist
Starts the htt_server process
Install-related tasks:
Configures the boot environment for the Live Upgrade software upon system startup or system shutdown
Checks for the presence of the /etc/.UNCONFIGURE
file
to see if the system should be reconfigured
Reboots the system from the installation media or a boot server
if either /.PREINSTALL
or /AUTOINSTALL
exists
Hardware-related tasks:
Starts the Sun Fire™ 15000 key management daemon (sckmd), if appropriate
Runs the flash PROM update script
Configures any graphic frame buffers or graphic accelerators
Transitions the following services between run level changes:
Apache (tomcat)
Mobile IP (mipagent)
Samba (smdb) and (nmdb)
Solstice Enterprise Agents™ daemon (dmispd) and (snmpXdmid)
Many of the system services and applications that are started at run level 2 depend on what software is installed on the system.
The /sbin/rc3
script runs the /etc/rc3.d
scripts to perform the following tasks:
Starts the Apache server daemon (tomcat), if configured
Starts Mobile IP daemon (mipagent), if configured
Starts the Samba daemons (smdb and nmdb), if configured
Starts the Solstice Enterprise Agents daemons (dmispd and snmpXdmid)