blob: 8889a9e6ed58b459dfee51b99249a34edd368eda (
plain)
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
|
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>s6-linux-init: the s6-linux-init-shutdownd program</title>
<meta name="Description" content="s6-linux-init: the s6-linux-init-shutdownd program" />
<meta name="Keywords" content="s6 linux init administration root utilities shutdown halt poweroff reboot daemon shutdownd" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">s6-linux-init</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>
<h1> The <tt>s6-linux-init-shutdownd</tt> program </h1>
<p>
<tt>s6-linux-init-shutdownd</tt> is the daemon that manages the shutdown
procedure for a s6-linux-init installation. It is not meant to be called
directly by the user.
</p>
<h2> Interface </h2>
<pre>
s6-linux-init-shutdownd [ -c <em>basedir</em> ] [ -g <em>gracetime</em> ] <em>fifo</em>
</pre>
<ul>
<li> <tt>s6-linux-init-shutdownd</tt> opens the <em>fifo</em> named pipe
and listens to it. This is where programs such as
<a href="s6-linux-init-shutdown.html">s6-linux-init-shutdown</a> send their
commands when they are told to trigger the shutdown procedure.</li>
<li> When it receives a command to shut down, <tt>s6-linux-init-shutdownd</tt>
first spawns the <em>rc.shutdown</em> script defined by the
<a href="s6-linux-init-maker.html">s6-linux-init-maker</a> invocation that
created the shutdownd service. </li>
<li> When this script exits, <tt>s6-linux-init-shutdownd</tt> kills all
processes, first with a SIGTERM, then (after the grace time specified by
the shutdown command) with a SIGKILL. </li>
<li> It then runs an automatically-generated script (called <em>stage 4</em>),
which unmounts the file systems and halts, powers off or reboots the
machine. </li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-c <em>basedir</em></tt> : look for the
<em>rc.shutdown</em> script in the <em>basedir</em><tt>/scripts</tt>
directory. Default is <tt>/etc/s6-linux-init/current</tt>. </li>
<li> <tt>-g <em>gracetime</em></tt> : if the shutdown command
does not specify a grace time between the SIGTERM and the SIGKILL, use
<em>gracetime</em> milliseconds. Default is 3000. </li>
</ul>
<h2> Notes </h2>
<ul>
<li> The <a href="s6-linux-init-shutdownd.html">s6-linux-init-shutdownd</a>
binary is not meant to be called directly by administrators. It is run
by a <a href="//skarnet.org/software/s6/">s6</a> service that is automatically
generated by
<a href="s6-linux-init-maker.html">s6-linux-init-maker</a>. </li>
</ul>
</body>
</html>
|