129 lines
3.2 KiB
HTML
129 lines
3.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SYSTEMD-HALT.SERVICE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SYSTEMD-HALT.SERVICE</H1>
|
|
Section: systemd-halt.service (8)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown - System shutdown logic
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
|
|
systemd-halt.service
|
|
<P>
|
|
|
|
systemd-poweroff.service
|
|
<P>
|
|
|
|
systemd-reboot.service
|
|
<P>
|
|
|
|
systemd-kexec.service
|
|
<P>
|
|
|
|
/lib/systemd/systemd-shutdown
|
|
<P>
|
|
|
|
/lib/systemd/system-shutdown/
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
systemd-halt.service
|
|
is a system service that is pulled in by
|
|
halt.target
|
|
and is responsible for the actual system halt. Similarly,
|
|
systemd-poweroff.service
|
|
is pulled in by
|
|
poweroff.target,
|
|
systemd-reboot.service
|
|
by
|
|
reboot.target
|
|
and
|
|
systemd-kexec.service
|
|
by
|
|
kexec.target
|
|
to execute the respective actions.
|
|
<P>
|
|
|
|
When these services are run, they ensure that PID 1 is replaced by the
|
|
/lib/systemd/systemd-shutdown
|
|
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.
|
|
<P>
|
|
|
|
It is necessary to have this code in a separate binary because otherwise rebooting after an upgrade might be broken --- 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.
|
|
<P>
|
|
|
|
Immediately before executing the actual system halt/poweroff/reboot/kexec
|
|
systemd-shutdown
|
|
will run all executables in
|
|
/lib/systemd/system-shutdown/
|
|
and pass one arguments to them: either
|
|
"halt",
|
|
"poweroff",
|
|
"reboot"
|
|
or
|
|
"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.
|
|
<P>
|
|
|
|
Note that
|
|
systemd-halt.service
|
|
(and the related units) should never be executed directly. Instead, trigger system shutdown with a command such as
|
|
"systemctl halt"
|
|
or suchlike.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemctl">systemctl</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?7+systemd.special">systemd.special</A></B>(7),
|
|
<B><A HREF="/cgi-bin/man/man2html?2+reboot">reboot</A></B>(2),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+systemd-suspend.service">systemd-suspend.service</A></B>(8),
|
|
<B><A HREF="/cgi-bin/man/man2html?7+bootup">bootup</A></B>(7)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:16 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|