located inside of /etc/

examples:

/etc/rc.common
/etc/rc.boot

rc.boot has the main job of figuring out the type of boot (Multi-User, Safe, CD-ROM, Network etc.).
The rest of the rc scripts are inside of /etc, and are as follows (

{APPLE CERT DOES NOT COVER ———————————————–}

rc.boot figures out if a file system consistency check is required. Single-user and CD-ROM boots do not run fsck. SafeBoot always runs fsck. rc.boot handles the return status of fsck as well.
If rc.boot exits successfully, /etc/rc, the multi-user startup script is then run. If booting from a CD-ROM, the script switches over to /etc/rc.cdrom (installation).
/etc/rc mounts local file systems (HFS+, HFS, UFS, /dev/fd, /.vol), ensures that the directory /private/var/tmp exists, and runs /etc/rc.installer_cleanup, if one exists (left by an installer before reboot).
/etc/rc.cleanup is run. It “cleans” a number of Unix and Mac specific directories/files.
BootCache is started.
Various sysctl variables are set (such as for maximum number of vnodes, System V IPC, etc.). If /etc/sysctl.conf exists (plus /etc/sysctl-macosxserver.conf on Mac OS X Server), it is read and sysctl variables contained therein are set.
syslogd is started.
The Mach symbol file is created.
/etc/rc starts kextd, the daemon process that loads kernel extension on demand from kernel or client processes.
/usr/libexec/register_mach_bootstrap_servers is run to load various Mach bootstrap based services contained in /etc/mach_init.d
portmap and netinfo are started.
If /System/Library/Extensions.mkext is older than /System/Library/Extensions, /etc/rc deletes the existing mkext and creates a new one. It also creates one if one doesn’t exist.
/etc/rc starts /usr/sbin/update, the daemon that flushes internal file system caches to disk frequently.
/etc/rc starts the virtual memory system. /private/var/vm is set up as the swap directory. /sbin/dynamic_pager is started with the appropriate arguments (swap filename path template, size of swap files created, high and low water alert triggers specifying when to create additional swap files or delete existing ones).
/etc/rc starts /usr/libexec/fix_prebinding to fix incorrectly prebound binaries.
/etc/rc executes /etc/rc.cleanup to clean up and reset files and devices.
/etc/rc finally launches /sbin/SystemStarter to handle startup items from locations such as /System/Library/StartupItems and /Library/StartupItems. A StartupItem is a program, usually a shell script, whose name matches the folder name. The folder contains a property list file containing key-value pairs such as Description, Provides, Requires, OrderPreference, start/stop messages etc. You can run SystemStarter -n -D as root to have the program print debugging and dependency information (without actually running anything).
The CoreGraphics startup item starts the Apple Type Services daemon (ATSServer) as well as the Window Server (WindowServer).

By Jason

Leave a Reply

Your email address will not be published. Required fields are marked *