|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
Solaris init states refer to the level of services provided by the system. The exact services and processes run at each init level are determined by the scripts in the /etc/rc#.d directories. The default service levels for each init state are listed below:
ok>)
or security monitor (>) prompt. It is safe to
shut down the system when it is at this init state.
/usr)
are mounted. This init state is often used for sensitive
functions (such as kernel libc patches) or while
troubleshooting a problem that is keeping the system from
booting into multiuser mode.
boot -a command. The system is taken to init 0
and an interactive boot is started.
/etc/inittab file).
The init states are defined in the /etc/inittab
file, which usually points at the scripts in /sbin/rcrun-level.
These scripts in turn examine the contents of the /etc/rcrun-level
directories. The scripts in these directories whose names begin
with the letter K are run in "stop" mode first in
alphabetical order. Then the scripts whose names begin with the
letter S are run in "start" mode in alphabetical
order.
To get to a desired run level n, each of the rc (run control)
scripts from 1 to n is run. To get to run level 0, the K
scripts are run in each rc#.d directory between the
current run level and 0 in reverse numerical order.
In the default configuration, the rc scripts accomplish the following tasks:
/sbin/rc0
/sbin/rc1
/sbin/rc2
TIMEZONE variable.
vold daemon.
boot -r.
inetd.
named, if appopriate.
rpcbind.
kerbd (the Kerberos client
daemon) if appropriate.
ypbind or rpc.nisd
as appropriate.
keyserv.
statd and lockd.
/etc/vfstab.
cron.
lp daemons, as appropriate.
sendmail. /sbin/rc3
sharetab.
nfsd and mountd.
rarpd and rpc.bootparamd,
as appropriate.
/sbin/rc4 is usually not defined. It can be
used in a non-default configuration to achieve a tailored
run level.
/sbin/rc5
syslogd.
cron services.
statd and lockd (NFS
client services).
/sbin/rc6
initdefault level from the
/etc/inittab /sbin/rcS: This run level differs from 1 in
the following particulars:
/usr and /usr/kvm
filesystems are checked and mounted (if necessary).
proc and
/dev/ are started.
$ who -r
Output: . run-level 3 Mar 3 14:04 3 0 S
Solaris changing
runlevels after bootup # /sbin/init 2
Solaris changing the default runlevel# vi /etc/inittab
Find out this entry:is:3:initdefault:
Change is:3 to number you want, don't use S, 0, 6 ;). Save file.
Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: February 28, 2008