File: runit.8

package info (click to toggle)
runit 2.1.2-25
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,788 kB
  • sloc: ansic: 5,848; sh: 846; makefile: 366
file content (93 lines) | stat: -rw-r--r-- 2,062 bytes parent folder | download | duplicates (3)
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
.TH runit 8
.SH NAME
runit \- a UNIX process no 1
.SH SYNOPSIS
.B runit
.SH DESCRIPTION
.B runit
must be run as Unix process no 1.
It performs the system's booting, running, and shutdown in three stages:
.SH STAGE 1
.B runit
runs
.I /etc/runit/1
and waits for it to terminate.
The system's one time tasks are done here.
.I /etc/runit/1
has full control of
.I /dev/console
to be able to start an emergency shell if the one time initialization tasks
fail. If
.I /etc/runit/1
crashes, or exits 100,
.B runit
will skip stage 2 and enter stage 3.
.SH STAGE 2
.B runit
runs
.IR /etc/runit/2 ,
which should not return until system shutdown; if it crashes, or exits 111,
it will be restarted.
Normally
.I /etc/runit/2
starts
.BR runsvdir (8).
.B runit
is able to handle the ctrl-alt-del keyboard request in stage 2, see below.
.SH STAGE 3
If
.B runit
is told to shutdown the system, or stage 2 returns, it terminates stage 2 if
it is running, and runs
.IR /etc/runit/3 .
The systems tasks to shutdown and possibly halt or reboot the system are
done here.
If stage 3 returns,
.B runit
checks if the file
.I /run/runit.reboot
exists and has the execute by owner permission set.
If so, the system is rebooted, it's halted otherwise.
If
.I /run/runit.nosync
exists,
.B runit
doesn't invoke sync(). This is useful in vservers.
.SH CTRL-ALT-DEL
If
.B runit
receives the ctrl-alt-del keyboard request and the file
.I /etc/runit/ctrlaltdel
exists and has the execute by owner permission set,
.B runit
runs
.IR /etc/runit/ctrlaltdel ,
waits for it to terminate, and then sends itself a CONT signal.
.SH SIGNALS
.B runit
only accepts signals in stage 2.
.P
If
.B runit
receives a CONT signal and the file
.I /run/runit.stopit
exists and has the execute by owner permission set,
.B runit
is told to shutdown the system.
.P
if
.B runit
receives an INT signal, a ctrl-alt-del keyboard request is triggered.
.SH SEE ALSO
runit-init(8),
runsvdir(8),
runsvchdir(8),
sv(8),
runsv(8),
chpst(8),
utmpset(8),
svlogd(8)
.P
http://smarden.org/runit/
.SH AUTHOR
Gerrit Pape <pape@smarden.org>