SysV message queues
===================

jinit uses SysV message queues extensively. If it is not possible to
open enough message queues, the bootup process will slow down as need
processes wait for one to become available. Indeed if you have too
few, then many bootup scripts will never complete successfully because
of the congestion.

A value of about 64 for /proc/sys/kernel/shmmni seems to be
appropriate. Note that this value is a lot higher than the default on
linux 2.4 kernels.

jinit
=====

An init for the Seventh distribution based on Richard Gooch's need(8)
scheme. See http://www.atnf.csiro.au/~rgooch/linux/boot-scripts/.

The default inittab is /etc/jinittab and not /etc/inittab.
For an example of a working setup see, example-setup/etc/.

Inittab lines that respawn commands are not understood. To respawn,
call the supplied "need" program like this:

% need --respawn tty1 gogetty /dev/tty1

If you want to give environment variables to the programs called by
init, put

export TERM=linux

or similar into the inittab.

Useful inittab variables:
	boot=/bin/script	run this script at startup
	sulogin=/bin/program	start this program when something goes wrong
	shutdown=/sbin/init-shutdown
				location of init-shutdown
	fileprefix=/etc/jinit/	services are kept in this directory 
				(need final /)

Signals are a bit like the FreeBSD init.

	SIGINT		shutdown and reboot system
	SIGUSR1		shutdown and halt system
	SIGUSR2		shutdown and turn off power
	SIGTERM		shutdown and start sulogin
	SIGQUIT		shutdown and exec init
	SIGTSTP		toggle respawning
	SIGHUP		fork a process to dump a core file

If init gets a SIGSEGV or other error signal, it will dump core and
re-execute itself with the "panic" option. This means it will forget
the state of services and what to respawn.

If started with the "emergency" option, it will run sulogin before
booting.

wtmp
====

Note that reboot and shutdown records are not written to wtmp. The
excuse for this is that the updwtmp function does not return error so
it is impossible to tell if e.g. the filesystem holding wtmp is
read-only on reboot.

