ninit(8)

NAME
ninit - a UNIX process no 1

SYNOPSIS
ninit [-Mnumber] [-Hhome] [-Ssystem] [service] ...

DESCRIPTION
ninit is a possible first process the kernel starts. It can start/stop/monitor all services the OS needs. To use ninit as system init, first read available documentation in http://riemann.fmi.uni-sofia.bg/ninit/ and then add the parameter init=/sbin/ninit to your kernel command line. If you want to use ninit only to start/monitor services and continue to use the default init(8) then put in /etc/inittab
NI:12345:respawn:/sbin/ninit
In this case you should remove the service sysvinit and don't use the programs: ninit-runlevel(8), ninit-sysvinit(8). Similarly it is possible to start ninit using /etc/init.d/ninit script.

USAGE
ninit will by default do nothing except start the ninit service defined in /etc/ninit/default which usually contains a file named depends specifying which services are to be started at bootup. To control ninit use the companion program nsvc. Do not make it SUID unless you know what are you doing! The program ninit-sysvinit listens to the fifo /dev/initctl and allows SysVinit programs shutdown, halt, reboot, telinit to work properly. If there is a service /etc/ninit/sysvinit it starts ninit-sysvinit. To stop the box running ninit use the programs ninit-shutdown or nsvc.

NONROOT USAGE
Any nonroot user can use /sbin/ninit to start/monitor own services. First make private ninit directory with
/etc/ninit/bin/ninit-conf ~/.ninit
and put somewhere in shell profile: export NINIT_HOME=~/.ninit Then create some services in $NINIT_HOME and start
/sbin/ninit -H$NINIT_HOME

OPTIONS

-Mnumber
    Tells ninit to use number bytes for memory buffer. One service uses approximately 30 bytes.

-Hhome
    Changes the ninit home. Default: /etc/ninit

-Ssystem
    Changes the ninit system directory. Default: sys

SIGNALS
On receiving of some signals ninit starts appropiate service.

SIGINT
    Normally the kernel sends this signal to ninit when CTRL-ALT-DEL is pressed. It activates the ctrlaltdel action and ninit starts the service ctrlaltdel

SIGWINCH
    The kernel sends this signal when the KeyboardSignal key is hit. It activates the kbrequest action and ninit starts the service kbreq

SIGHUP
    Has the same effect as telinit q. Ninit restarts the service levelQ

SIGUSR1
    On receipt of this signal, ninit closes and re-opens its control fifo, /dev/initctl. Useful for bootscripts when /dev is remounted.

SIGPWR
    Ninit starts the service powerS. This service starts the program ninit-sysvinit with one argument: powerS.

SERVICES
Each service has own subdirectory in /etc/ninit/ three. There are lots of config files for a service. The main daemon ninit check only the files depends, sync, respawn, end to start a service. Check olso the link:
http://riemann.fmi.uni-sofia.bg/ninit/files.html

If the servive name start with '#' or '-' it is blacklisted. You can now blacklist services temporarily by passing it on the kernel command line. The first time they are to be started will then be skipped. Use this, for example, to not start the dhcp client when your notebook is not plugged in a network. Look in ninitfeatures.h if ninit is compiled to use this option.

FILES
NINIT_HOME/in
NINIT_HOME/out
NINIT_HOME/sys/
/dev/initctl

AUTHOR
ninit was written by Nikola Vladov and can be downloaded from http://riemann.fmi.uni-sofia.bg/ninit/

SEE ALSO
nsvc(8), ninit-service(8), ninit-reload(8)
ninit-shutdown(8), ninit-reboot(8), nkillall(8)
ninit-sysvinit(8), ninit-runlevel(8)
minit(8), http://www.fefe.de/minit/
init(8), shutdown(8), halt(8), reboot(8) Part of this manpage was written by Erich Schubert.