1SYSTEMD-HALT.SERVICE(8)      systemd-halt.service      SYSTEMD-HALT.SERVICE(8)
2
3
4

NAME

6       systemd-halt.service, systemd-poweroff.service, systemd-reboot.service,
7       systemd-kexec.service, systemd-shutdown - System shutdown logic
8

SYNOPSIS

10       systemd-halt.service
11
12       systemd-poweroff.service
13
14       systemd-reboot.service
15
16       systemd-kexec.service
17
18       /usr/lib/systemd/systemd-shutdown
19
20       /usr/lib/systemd/system-shutdown/
21

DESCRIPTION

23       systemd-halt.service is a system service that is pulled in by
24       halt.target and is responsible for the actual system halt. Similarly,
25       systemd-poweroff.service is pulled in by poweroff.target,
26       systemd-reboot.service by reboot.target and systemd-kexec.service by
27       kexec.target to execute the respective actions.
28
29       When these services are run, they ensure that PID 1 is replaced by the
30       /usr/lib/systemd/systemd-shutdown tool which is then responsible for
31       the actual shutdown. Before shutting down, this binary will try to
32       unmount all remaining file systems, disable all remaining swap devices,
33       detach all remaining storage devices and kill all remaining processes.
34
35       It is necessary to have this code in a separate binary because
36       otherwise rebooting after an upgrade might be broken — the running PID
37       1 could still depend on libraries which are not available any more,
38       thus keeping the file system busy, which then cannot be re-mounted
39       read-only.
40
41       Immediately before executing the actual system
42       halt/poweroff/reboot/kexec systemd-shutdown will run all executables in
43       /usr/lib/systemd/system-shutdown/ and pass one arguments to them:
44       either "halt", "poweroff", "reboot" or "kexec", depending on the chosen
45       action. All executables in this directory are executed in parallel, and
46       execution of the action is not continued before all executables
47       finished.
48
49       Note that systemd-halt.service (and the related units) should never be
50       executed directly. Instead, trigger system shutdown with a command such
51       as "systemctl halt" or suchlike.
52

SEE ALSO

54       systemd(1), systemctl(1), systemd.special(7), reboot(2), systemd-
55       suspend.service(8), bootup(7)
56
57
58
59systemd 241                                            SYSTEMD-HALT.SERVICE(8)
Impressum