1:255.13-alt1
[systemd_ALT.git] / man / systemd-battery-check.service.xml
blob8be54848ce40dbc9868f16a4e2026a7b2f02bf0f
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.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude">
8   <refentryinfo>
9     <title>systemd-battery-check</title>
10     <productname>systemd</productname>
11   </refentryinfo>
13   <refmeta>
14     <refentrytitle>systemd-battery-check.service</refentrytitle>
15     <manvolnum>8</manvolnum>
16   </refmeta>
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>
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>
32   <refsect1>
33     <title>Description</title>
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>
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>
42   <refsect1>
43     <title>Options</title>
45     <para>The following options are understood by <command>systemd-battery-check</command>:</para>
47     <variablelist>
48       <xi:include href="standard-options.xml" xpointer="help" />
49       <xi:include href="standard-options.xml" xpointer="version" />
50     </variablelist>
51   </refsect1>
53   <refsect1>
54     <title>Exit status</title>
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>
62   <refsect1>
63     <title>Kernel Command Line</title>
65     <para>The following variables are understood:</para>
67     <variablelist class='kernel-commandline-options'>
68       <varlistentry>
69         <term><varname>systemd.battery-check=<replaceable>BOOL</replaceable></varname></term>
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>
78         <xi:include href="version-info.xml" xpointer="v254"/>
79         </listitem>
80       </varlistentry>
81     </variablelist>
82   </refsect1>
84   <refsect1>
85     <title>See Also</title>
86     <para>
87       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
88     </para>
89   </refsect1>
91 </refentry>