]>
Commit | Line | Data |
---|---|---|
be994c26 YW |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
be994c26 YW |
4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
5 | ||
95dafd30 | 6 | <refentry id="systemd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude"> |
be994c26 YW |
7 | |
8 | <refentryinfo> | |
9 | <title>systemd-battery-check</title> | |
10 | <productname>systemd</productname> | |
11 | </refentryinfo> | |
12 | ||
13 | <refmeta> | |
95dafd30 | 14 | <refentrytitle>systemd-battery-check.service</refentrytitle> |
be994c26 YW |
15 | <manvolnum>8</manvolnum> |
16 | </refmeta> | |
17 | ||
18 | <refnamediv> | |
95dafd30 | 19 | <refname>systemd-battery-check.service</refname> |
be994c26 | 20 | <refname>systemd-battery-check</refname> |
bf63dadb | 21 | <refpurpose>Check battery level whether there's enough charge, and power off if not</refpurpose> |
be994c26 YW |
22 | </refnamediv> |
23 | ||
24 | <refsynopsisdiv> | |
95dafd30 | 25 | <para><filename>systemd-battery-check.service</filename></para> |
be994c26 YW |
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 | ||
bf63dadb ZJS |
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> | |
be994c26 YW |
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 | ||
7cfef4bb YW |
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> | |
78266a54 | 69 | <term><varname>systemd.battery_check=<replaceable>BOOL</replaceable></varname></term> |
7cfef4bb YW |
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> | |
ec07c3c8 AK |
77 | |
78 | <xi:include href="version-info.xml" xpointer="v254"/> | |
7cfef4bb YW |
79 | </listitem> |
80 | </varlistentry> | |
81 | </variablelist> | |
82 | </refsect1> | |
83 | ||
be994c26 YW |
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> |