1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
ninit(8) 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 possi-
ble 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 spec-
ifying 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 pro-
gram 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.
Jan 15, 2010 ninit(8)
|