Init for Mastodon Linux

Init is the mother of all processes – it is the first process a UNIX® system starts up and it manages all runlevel changes and essential programs (getty, and, on some systems xdm.) It reads the file /etc/inittab to find out what processes to run and when to run them.

The Mastodon init setup is a service based one, where each init script starts a particular system service and refers to the other services by name. init maintains an incore registry of active services – each init script queries this database to see if its prerequisites are running and starts them if they aren’t.

Init puts the system into one of 4 different runlevels:

(S)ingle-user
This conventionally is just a single shell, with all filesystems except the root filesystem unmounted.
(M)ultiuser
This is the system as it normally functions, with all services running and accessable to users.
(R)ebooting
init goes into this runlevel when it’s stopping all services and preparing to do a software reboot of the computer.
(H)alting
init goes into this runlevel when it’s stopping all services and preparing to halt the computer. It’s much like the r runlevel, except that it will go back into multiuser mode if you press a key at the **system halted** prompt.

The init package comes with the following programs:

Source Code

version 1.1
With manpages! It also changes shutdown to not ask for a message unless you give the -m flag and checks in a fix to stop it from getting confused about how long to wait before entering OhMyGodProcessesWon'tStopTimeToPanicNow! mode during shutdown.
version 1.0
The first release of init. It uses a fifo to pass commands into the init process, except for runlevel changes which are passed by signal. A few manpages were written for this release, but not very many.