aboutsummaryrefslogtreecommitdiffstats
path: root/doc/bin/powertool.html
blob: f4eb785b6bb737b924ab194a4e0dfc43c2f6e5f1 (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
<!DOCTYPE html>
<html>
	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    	<meta http-equiv="Content-Language" content="en" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
    	<title>powertool</title>
    	<meta name="Description" content="Reference of the powertool program." />
    	<meta name="Keywords" content="linux linux-supplements shutdown halt reboot poweroff" />
	</head>
	<header>
		<p>
			<a href="//0x53.net/software/linux-supplements">linux-supplements</a>
			<br />
			<a href="//0x53.net/software">Software</a>
			<br />
			<a href="//0x53.net">0x53.net</a>
		</p>
	</header>
	<body>
		<h1>The powertool program</h1>
		<p>
			powertool instructs the Linux Kernel to either
			halt, poweroff or reboot.
			This initiates hardware shutdown, not an orderly
			shutdown of the system. It should be the last
			program called during an orderly shutdown sequence.
		</p>
		<h2>Interface</h2>
		<pre>     powertool -h | -p | -r</pre>
		<p>
			powertool instructs the Linux Kernel according to the options given.
			The op's listed below are documented
			<a href="https://www.man7.org/linux/man-pages/man2/reboot.2.html">here</a>.
		</p>
		<h2>Options</h2>
		<ul>
			<li>
				<code>-h</code>: Instruct the Linux Kernel to halt,
				corresponding to the op <code>RB_HALT_SYSTEM</code>.
			</li>
			<li>
				<code>-p</code>: Instruct the Linux Kernel to poweroff,
				corresponding to the op <code>RB_POWER_OFF</code>.
			</li>
			<li>
				<code>-r</code>: Instruct the Linux Kernel to reboot,
				corresponding to the op <code>RB_AUTOBOOT</code>.
			</li>
		</ul>
		<h2>Exit codes</h2>
		<ul>
			<li>
				100: wrong usage.
			</li>
			<li>
				111: system call failed.
			</li>
		</ul>
	</body>
</html>