summaryrefslogtreecommitdiff
path: root/doc/s6-linux-init-shutdown.html
blob: b48ea61fe8498e5584d028b1d602d980fa8c2ff8 (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
<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-shutdown program</title>
    <meta name="Description" content="s6-linux-init: the s6-linux-init-shutdown program" />
    <meta name="Keywords" content="s6 linux init administration root utilities shutdown halt poweroff reboot" />
    <!-- <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-shutdown</tt> program </h1>

<p>
<tt>s6-linux-init-shutdown</tt> triggers the system shutdown procedure.
It is normally invoked as <tt>/sbin/shutdown</tt>.
</p>

<h2> Interface </h2>

<pre>
     s6-linux-init-shutdown [ -h | -p | -r | -k ] [ -a ] [ -t <em>sec</em> ] [ -f | -F ] <em>time</em> [ <em>message</em> ]
     s6-linux-init-shutdown -c [ <em>message</em> ]
</pre>

<ul>
 <li> If the <tt>-c</tt> option is present, a pending shutdown is cancelled. </li>
 <li> Else, it triggers the shutdown procedure. </li>
 <li> It exits 0. The shutdown procedure happens asynchronously. </li>
</ul>

<p>
 The <tt>s6-linux-init-shutdown</tt> program conforms to the LSB-3.0.0
<a href="http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/shutdown.html">shutdown</a>
interface.
</p>

<h2> Exit codes </h2>

<ul>
 <li> 0: shutdown procedure triggered. </li>
 <li> 100: wrong usage, or user does not have root privileges. </li>
 <li> 111: system call failed. </li>
</ul>

<h2> Notes </h2>

<ul>
 <li> The <tt>s6-linux-init-shutdown</tt>
binary is not meant to be called directly by administrators. Instead, after a
<a href="s6-linux-init-maker.html">s6-linux-init-maker</a> invocation,
the <tt>bin/</tt> subdirectory of the target will contain a <tt>shutdown</tt>
symlink to <tt>s6-linux-init-shutdown</tt>. The <tt>bin/</tt> subdirectory
should be copied by the administrator into <tt>/sbin</tt> for full
interface compatibility with sysvinit. </li>
</ul>

</body>
</html>