]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-battery-check.service.xml
Merge pull request #32755 from yuwata/test-network-cleanups
[thirdparty/systemd.git] / man / systemd-battery-check.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="systemd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>systemd-battery-check</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd-battery-check.service</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd-battery-check.service</refname>
20 <refname>systemd-battery-check</refname>
21 <refpurpose>Check battery level whether there's enough charge, and power off if not</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename>systemd-battery-check.service</filename></para>
26 <cmdsynopsis>
27 <command>/usr/lib/systemd/systemd-battery-check</command>
28 <arg choice="opt" rep="repeat">OPTIONS</arg>
29 </cmdsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Description</title>
34
35 <para>This service checks the presence of an external power supply and the battery level during the early
36 boot stage to determine whether there is sufficient power to carry on with the booting process.</para>
37
38 <para><command>systemd-battery-check</command> returns success if the device is connected to an AC power
39 source or if the battery charge is greater than 5%. It returns failure otherwise.</para>
40 </refsect1>
41
42 <refsect1>
43 <title>Options</title>
44
45 <para>The following options are understood by <command>systemd-battery-check</command>:</para>
46
47 <variablelist>
48 <xi:include href="standard-options.xml" xpointer="help" />
49 <xi:include href="standard-options.xml" xpointer="version" />
50 </variablelist>
51 </refsect1>
52
53 <refsect1>
54 <title>Exit status</title>
55
56 <para>
57 On success (running on AC power or battery capacity greater than 5%), 0 is returned, a non-zero failure
58 code otherwise.
59 </para>
60 </refsect1>
61
62 <refsect1>
63 <title>Kernel Command Line</title>
64
65 <para>The following variables are understood:</para>
66
67 <variablelist class='kernel-commandline-options'>
68 <varlistentry>
69 <term><varname>systemd.battery_check=<replaceable>BOOL</replaceable></varname></term>
70
71 <listitem>
72 <para>Takes a boolean. If specified with false, <command>systemd-battery-check</command> command
73 will return immediately with exit status 0 without checking battery capacity and AC power
74 existence, and the service <filename>systemd-battery-check.service</filename> will succeed. This
75 may be useful when the command wrongly detects and reports battery capacity percentage or AC power
76 existence, or when you want to boot the system forcibly.</para>
77
78 <xi:include href="version-info.xml" xpointer="v254"/>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82 </refsect1>
83
84 <refsect1>
85 <title>See Also</title>
86 <para>
87 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
88 </para>
89 </refsect1>
90
91 </refentry>