]> git.proxmox.com Git - systemd.git/blob - man/systemd-halt.service.8
Imported Upstream version 219
[systemd.git] / man / systemd-halt.service.8
1 '\" t
2 .TH "SYSTEMD\-HALT\&.SERVICE" "8" "" "systemd 219" "systemd-halt.service"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown \- System shutdown logic
24 .SH "SYNOPSIS"
25 .PP
26 systemd\-halt\&.service
27 .PP
28 systemd\-poweroff\&.service
29 .PP
30 systemd\-reboot\&.service
31 .PP
32 systemd\-kexec\&.service
33 .PP
34 /usr/lib/systemd/systemd\-shutdown
35 .SH "DESCRIPTION"
36 .PP
37 systemd\-halt\&.service
38 is a system service that is pulled in by
39 halt\&.target
40 and is responsible for the actual system halt\&. Similarly,
41 systemd\-poweroff\&.service
42 is pulled in by
43 poweroff\&.target,
44 systemd\-reboot\&.service
45 by
46 reboot\&.target
47 and
48 systemd\-kexec\&.service
49 by
50 kexec\&.target
51 to execute the respective actions\&.
52 .PP
53 When these services are run, they ensure that PID 1 is replaced by the
54 /usr/lib/systemd/systemd\-shutdown
55 tool which is then responsible for the actual shutdown\&. Before shutting down, this binary will try to unmount all remaining file systems, disable all remaining swap devices, detach all remaining storage devices and kill all remaining processes\&.
56 .PP
57 It is necessary to have this code in a separate binary because otherwise rebooting after an upgrade might be broken\ \&\(em the running PID 1 could still depend on libraries which are not available any more, thus keeping the file system busy, which then cannot be re\-mounted read\-only\&.
58 .PP
59 Immediately before executing the actual system halt/poweroff/reboot/kexec
60 systemd\-shutdown
61 will run all executables in
62 /usr/lib/systemd/system\-shutdown/
63 and pass one arguments to them: either
64 "halt",
65 "poweroff",
66 "reboot"
67 or
68 "kexec", depending on the chosen action\&. All executables in this directory are executed in parallel, and execution of the action is not continued before all executables finished\&.
69 .PP
70 Note that
71 systemd\-halt\&.service
72 (and the related units) should never be executed directly\&. Instead, trigger system shutdown with a command such as
73 "systemctl halt"
74 or suchlike\&.
75 .SH "SEE ALSO"
76 .PP
77 \fBsystemd\fR(1),
78 \fBsystemctl\fR(1),
79 \fBsystemd.special\fR(7),
80 \fBreboot\fR(2),
81 \fBsystemd-suspend.service\fR(8)