]>
Commit | Line | Data |
---|---|---|
0127336c LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2012 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | --> | |
23 | ||
24 | <refentry id="systemd-halt.service"> | |
25 | ||
26 | <refentryinfo> | |
27 | <title>systemd-halt.service</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd-halt.service</refentrytitle> | |
42 | <manvolnum>8</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd-halt.service</refname> | |
47 | <refname>systemd-poweroff.service</refname> | |
48 | <refname>systemd-reboot.service</refname> | |
49 | <refname>systemd-kexec.service</refname> | |
50 | <refname>systemd-shutdown</refname> | |
51 | <refpurpose>systemd System Shutdown Logic</refpurpose> | |
52 | </refnamediv> | |
53 | ||
54 | <refsynopsisdiv> | |
55 | <para><filename>systemd-halt.service</filename></para> | |
56 | <para><filename>systemd-poweroff.service</filename></para> | |
57 | <para><filename>systemd-reboot.service</filename></para> | |
58 | <para><filename>systemd-kexec.service</filename></para> | |
59 | <para><filename>/usr/lib/systemd/systemd-shutdown</filename></para> | |
60 | </refsynopsisdiv> | |
61 | ||
62 | <refsect1> | |
63 | <title>Description</title> | |
64 | ||
65 | <para><filename>systemd-halt.service</filename> is a | |
66 | system service that is pulled in by | |
67 | <filename>halt.target</filename> and is responsible | |
68 | for the actual system halt. Similar, | |
69 | <filename>systemd-poweroff.service</filename> is | |
70 | pulled in by <filename>poweroff.target</filename>, | |
71 | <filename>systemd-reboot.service</filename> by | |
72 | <filename>reboot.target</filename> and | |
73 | <filename>systemd-kexec.service</filename> by | |
74 | <filename>kexec.target</filename> to execute the | |
75 | respective actions.</para> | |
76 | ||
77 | <para>When these services are run they ensure that PID | |
78 | 1 is replaced by the | |
79 | <filename>/usr/lib/systemd/system-shutdown</filename> | |
80 | tool which is then responsible for the actual | |
81 | shutdown. Before shutting down this binary will try to | |
82 | unmount all remaining file systems, disable all | |
83 | remaining swap devices, detach all remaining storage | |
84 | devices and kill all remaining processes.</para> | |
85 | ||
86 | <para>Immediately before executing the actual system | |
87 | halt/poweroff/reboot/kexec | |
88 | <filename>system-shutdown</filename> will run all | |
89 | executables in | |
90 | <filename>/usr/lib/systemd/system-shutdown/</filename> | |
91 | and pass one arguments to them: either | |
92 | "<literal>halt</literal>", | |
93 | "<literal>poweroff</literal>", | |
94 | "<literal>reboot</literal>" or | |
95 | "<literal>kexec</literal>", depending on the chosen | |
96 | action. All executables in this directory are executed | |
97 | in parallel, and execution of the action is not | |
98 | continued before all executables finished.</para> | |
99 | ||
100 | <para>Note that | |
101 | <filename>systemd-halt.service</filename> (and the | |
102 | related units) should never be executed | |
103 | directly. Instead, trigger system shutdown with a | |
104 | command such as "<literal>systemctl halt</literal>" or | |
105 | suchlike.</para> | |
106 | </refsect1> | |
107 | ||
108 | <refsect1> | |
109 | <title>See Also</title> | |
110 | <para> | |
111 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
112 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
113 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | |
114 | <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>, | |
115 | <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
116 | </para> | |
117 | </refsect1> | |
118 | ||
119 | </refentry> |