[Next] [Previous] [up] [Top] [Contents]

6.3.0.1 RC scripts

SunOS 4.1.X uses the RC scripts rc.boot, rc.ip, rc, rc.single, and rc.local, all in /etc. The major functions performed by these scripts are listed in the next table.

SunOS 4.1.X RC Scripts
RC ScriptFunctions
rc.bootbring up the network, matching hostnames with the interfaces

rc.ip

set the default route (required for a diskless client to mount /usr)

mount /usr (read only)

fsck local file systems

rc.ipbring up the network
rcrc.single

mount local file systems

check quotas

rc.local

add additional swap

start lpd

rc.singleremount / and /usr read/write

fix up mtab

clean up /etc/ld.so.cache and /etc/utmp

use tzsetup to set the timezone in the kernel

load the keyboard translation table for the current keyboard

rc.localstart the portmapper

check for .UNCONFIGURED, if there reconfigure the system

run tzsetup to set the timezone

set the domainname if running NIS

if an NIS server run ypserv

if the NIS master run ypxfrd

if an NIS client run ypbind

run the RPC keyserver, keyserv

set the netmask and broadcast for the network interfaces

set the default route again

diskless clients synchronize time-of-day with their server

if there's no default route run the route daemon

if specified mount /tmp on swap

mount NFS files

if a name server run the named daemon

start the block I/O daemon, biod

if an NFS server start the nfsd daemons

clean up /etc/motd

start the system log daemon, syslogd

if specified check for a crash dump and save it

initialize any specialized hardware

start any local daemons, e.g. sendmail

if specified, export NFS file systems

if a diskless boot server run rpc.bootparamd

start the file status monitor and locking daemons

any other locally supplied calls

SunOS 5.X uses the RC scripts rcS, rc0, rc1, rc2, rc3, rc5, and rc6 in /sbin. These start or stop services defined in the scripts contained in the /etc/rc#.d directories. The S scripts are run during startup, lower through higher run-level. The K scripts are run during shutdown, higher through lower run-level. These RC scripts provide the functions listed in the next table.

SunOS 5.X RC Scripts
RC ScriptFunctions
/sbin/rcSrun the scripts in /etc/rcS.d
/etc/rcS.d/S30rootusr.shconfigure the network, match hostnames to interfaces

set the default route

mount /usr (read only)

/etc/rcS.d/S33keymap.shloads the keyboard mappings
/etc/rcS.d/S35cacheos.shconfigures the devices when running cachefs
/etc/rcS.d/S40standardmounts.shadd physical swap space

check and remount / and /usr read/write

/etc/rcS.d/S50/S50drvconfigconfigure the /devices directory
/etc/rcS.d/S60devlinksconfigure the /dev directory
/etc/rcS.d/S70buildmnttab.shmount file systems for single user mode
/sbin/rc0run the scripts in /etc/rc0.d, kill all processes,

sync the file systems, unmount all partitions,

bring the system down

/etc/rc0.d/K10dtlogininitiate the CDE tasks
/etc/rc0.d/K20lpstop the line printer daemon
/etc/rc0.d/K42auditstop the audit daemon
/etc/rc0.d/K47aspppstop the PPP daemon
/etc/rc0.d/K50utmpdstop the utmp daemon
/etc/rc0.d/K55syslogshutdown the system log daemon
/etc/rc0.d/K57sendmailstop the sendmail daemon
/etc/rc0.d/K66nfs.serverkill the nfs, mount, bootparam and rarp daemons
/etc/rc0.d/K68rpckill rpc daemons
/etc/rc0.d/K69autofsstop the automount daemon
/etc/rc0.d/K70cronshutdown cron
/etc/rc0.d/K75nfs.clientkill lockd, statd, and the automounter
/etc/rc0.d/K76ncsdkill ncsd daemons
/etc/rc0.d/K85rpckill rpc daemons
/sbin/rc1run the scripts in /etc/rc1.d, kill all processes,

unmount all partitions, leave the system in single-user mode

/etc/rc1.d/K10dtlogininitiate the CDE tasks
/etc/rc1.d/K42auditstop the audit daemon
/etc/rc1.d/K47aspppstop the PPP daemon
/etc/rc1.d/K50utmpdstop the utmp daemon
/etc/rc1.d/K55syslogstop syslog
/etc/rc1.d/K57sendmailstop sendmail
/etc/rc1.d/K65nfs.servershutdown NFS services
/etc/rc1.d/K67rpcshutdown RPC services
/etc/rc1.d/K68autofsstop the automount daemon
/etc/rc1.d/K70cronshutdown cron
/etc/rc1.d/K76ncsdkill ncsd daemons
/etc/rc1.d/K80nfs.clientunmount all NFS file systems
/etc/rc1.d/S01MOUNTFSYSmount all local file systems
/sbin/rc2set the timezone

run the scripts in /etc/rc2.d

/etc/rc2.d/K20lpshutdown the line printer
/etc/rc2.d/K60nfs.servershutdown NFS services
/etc/rc2.d/S01MOUNTFSYSmount all local file systems
/etc/rc2.d/S05RMTMPFILESclean up /tmp and /var/tmp
/etc/rc2.d/S20sysetupprint the system configuration

if specified save the core image

/etc/rc2.d/S21perfenable system performance accounting
/etc/rc2.d/S30sysid.netif /.UNCONFIGURED exists reconfigure the system
/etc/rc2.d/S47aspppstart the PPP daemon
/etc/rc2.d/S69inetconfigure the default route

set the domainname

/etc/rc2.d/S70uucpclean up uucp locks
/etc/rc2.d/S71rpcstart rpc

start NIS(+) daemons

/etc/rc2.d/S71sysid.sysif /.UNCONFIGURED exists reconfigure the system
/etc/rc2.d/S71ypstart up NIS (up) services
/etc/rc2.d/S72autoinstallif /AUTOINSTALL exists re-install the OS
/etc/rc2.d/S72inetsvcset the default interface for multicasting

start inetd

if a name server start named

/etc/rc2.d/S73nfs.clientstart lockd and statd

mount NFS file systems

/etc/rc2.d/S74autofsstart the automount daemon
/etc/rc2.d/S74syslogstart the system log daemon
/etc/rc2.d/S75cronstart cron
/etc/rc2.d/S76nscdstart up the name service cache daemon
/etc/rc2.d/S80PRESERVEsave edit files in /usr/preserve
/etc/rc2.d/S80lpstart the line printer scheduler
/etc/rc2.d/S88utmpdstart up utmpd to clean up utmp entries
/etc/rc2.d/S88sendmailstart sendmail
/etc/rc2.d/S92rtvc-configset SunVideo device permissions
/etc/rc2.d/S92volmgtstart the volume management daemon
/etc/rc2.d/S93cacheos.finistfinal cachefs settings
/etc/rc2.d/S99auditstart the audit daemon
/etc/rc2.d/S99dtloginautomatically start the CDE login window on the console
/sbin/rc3run the scripts in /etc/rc3.d
/etc/rc3.d/S15nfs.serverstart the processes required for remote file sharing
/etc/rc3.d/S20sample_daemonstart your daemon
/sbin/rc5run /sbin/rc0, kill off all process, unmount all filesystems
/sbin/rc6 run /sbin/rc0, kill off all process, unmount all filesystems


Unix System Administration - 8 AUG 1996
[Next] [Previous] [up] [Top] [Contents]