Search:  
Gentoo Wiki

Initdefault

The inital default processes are started after the bootwait processes

The initial default processes are started by the init process following completion of the bootwait processes. The init process triggers the initial default processes according the the default runlevel defined in the inittab configuration file.

The default runlevel

The inittab configuration file contains the following entries:

id:3:initdefault:

l3:3:wait:/sbin/rc default

c1:12345:respawn:/sbin/agetty 38400 tty1 linux c2:2345:respawn:/sbin/agetty 38400 tty2 linux c3:2345:respawn:/sbin/agetty 38400 tty3 linux c4:2345:respawn:/sbin/agetty 38400 tty4 linux c5:2345:respawn:/sbin/agetty 38400 tty5 linux c6:2345:respawn:/sbin/agetty 38400 tty6 linux


This causes the rc script to run with the default command line parameter, and for getty terminal processes to be spawned, so that users can login to the system.

The default startup scripts

The rc script takes the following actions during the default startup stage:

Configure the signal trap, as before

Set the umask to 022, as before

Obtain definitions and functions from the functions.sh include file, as before

Disable the RC_INTERACTIVE flag, if interactive mode is not possible on the terminal type

Define try, check_statedir, noblock_read, user_want_interactive, do_interactive, get_critical_services, and check_critical_services functions.

Set argv1 to the "default" (passed as a parameter from inittab by the init daemon.)

If the ksoftlevel exists in $svcdir (/var/lib/init.d), aquire its content as argv1 and remove ksoftlevel.

Ensure criticalservices are in the current runlevel.

Run /lib/rcscripts/sh/rc-services.sh

Determine if interactive mode is required

Set the SOFTLEVEL

Update the splashscreen

Use dolisting to create mylevels as a list of files in /etc/runlevels/3 or the appropriate SOFTLEVEL

Create a set of symlinks to the init scripts in $svcdir (/var/lib/init.d)

Stop all services in get_stop_services

Start all services in get_start_services

Restart devfsd if it is not running

Uninitialize CONSOLETYPE

Update the splash screen

Retrieved from "http://www.gentoo-wiki.info/Initdefault"

Last modified: Fri, 05 Sep 2008 08:47:00 +0000 Hits: 591