]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-battery-check.service.xml
62d6bf566016cd51ea2abb49a715c0fd653a1958
[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.2/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>
36 <filename>systemd-battery-check.service</filename> is used to check the battery level during the early
37 boot stage to determine whether there's sufficient battery power to carry on with the booting process.
38 </para>
39 <para>
40 <command>systemd-battery-check</command> returns success if the device is connected to an AC power
41 source or if the battery charge is greater than 5%. It returns failure otherwise.
42 </para>
43 </refsect1>
44
45 <refsect1>
46 <title>Options</title>
47
48 <para>The following options are understood by <command>systemd-battery-check</command>:</para>
49
50 <variablelist>
51 <xi:include href="standard-options.xml" xpointer="help" />
52 <xi:include href="standard-options.xml" xpointer="version" />
53 </variablelist>
54 </refsect1>
55
56 <refsect1>
57 <title>Exit status</title>
58
59 <para>
60 On success (running on AC power or battery capacity greater than 5%), 0 is returned, a non-zero failure
61 code otherwise.
62 </para>
63 </refsect1>
64
65 <refsect1>
66 <title>Kernel Command Line</title>
67
68 <para>The following variables are understood:</para>
69
70 <variablelist class='kernel-commandline-options'>
71 <varlistentry>
72 <term><varname>systemd.battery-check=<replaceable>BOOL</replaceable></varname></term>
73
74 <listitem>
75 <para>Takes a boolean. If specified with false, <command>systemd-battery-check</command> command
76 will return immediately with exit status 0 without checking battery capacity and AC power
77 existence, and the service <filename>systemd-battery-check.service</filename> will succeed. This
78 may be useful when the command wrongly detects and reports battery capacity percentage or AC power
79 existence, or when you want to boot the system forcibly.</para>
80
81 <xi:include href="version-info.xml" xpointer="v254"/>
82 </listitem>
83 </varlistentry>
84 </variablelist>
85 </refsect1>
86
87 <refsect1>
88 <title>See Also</title>
89 <para>
90 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
91 </para>
92 </refsect1>
93
94 </refentry>