runit.8 (1970B)
1 .TH runit 8 2 .SH NAME 3 runit \- a UNIX process no 1 4 .SH SYNOPSIS 5 .B runit 6 .SH DESCRIPTION 7 .B runit 8 must be run as Unix process no 1. 9 It performs the system's booting, running, and shutdown in three stages: 10 .SH STAGE 1 11 .B runit 12 runs 13 .I /etc/runit/1 14 and waits for it to terminate. 15 The system's one time tasks are done here. 16 .I /etc/runit/1 17 has full control of 18 .I /dev/console 19 to be able to start an emergency shell if the one time initialization tasks 20 fail. If 21 .I /etc/runit/1 22 crashes, or exits 100, 23 .B runit 24 will skip stage 2 and enter stage 3. 25 .SH STAGE 2 26 .B runit 27 runs 28 .IR /etc/runit/2 , 29 which should not return until system shutdown; if it crashes, or exits 111, 30 it will be restarted. 31 Normally 32 .I /etc/runit/2 33 starts 34 .BR runsvdir (8). 35 .B runit 36 is able to handle the ctrl-alt-del keyboard request in stage 2, see below. 37 .SH STAGE 3 38 If 39 .B runit 40 is told to shutdown the system, or stage 2 returns, it terminates stage 2 if 41 it is running, and runs 42 .IR /etc/runit/3 . 43 The systems tasks to shutdown and possibly halt or reboot the system are 44 done here. 45 If stage 3 returns, 46 .B runit 47 checks if the file 48 .I /etc/runit/reboot 49 exists and has the execute by owner permission set. 50 If so, the system is rebooted, it's halted otherwise. 51 .SH CTRL-ALT-DEL 52 If 53 .B runit 54 receives the ctrl-alt-del keyboard request and the file 55 .I /etc/runit/ctrlaltdel 56 exists and has the execute by owner permission set, 57 .B runit 58 runs 59 .IR /etc/runit/ctrlaltdel , 60 waits for it to terminate, and then sends itself a CONT signal. 61 .SH SIGNALS 62 .B runit 63 only accepts signals in stage 2. 64 .P 65 If 66 .B runit 67 receives a CONT signal and the file 68 .I /etc/runit/stopit 69 exists and has the execute by owner permission set, 70 .B runit 71 is told to shutdown the system. 72 .P 73 if 74 .B runit 75 receives an INT signal, a ctrl-alt-del keyboard request is triggered. 76 .SH SEE ALSO 77 runit-init(8), 78 runsvdir(8), 79 runsvchdir(8), 80 sv(8), 81 runsv(8), 82 chpst(8), 83 utmpset(8), 84 svlogd(8) 85 .P 86 http://smarden.org/runit/ 87 .SH AUTHOR 88 Gerrit Pape <pape@smarden.org>