summaryrefslogtreecommitdiffstats
path: root/man/systemd-battery-check.service.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-06-30 17:09:21 +0200
committerMike Yuan <me@yhndnzj.com>2023-06-30 21:19:16 +0200
commit95dafd30da88bfeffdc3556dccc113709a13dbae (patch)
treee63e4e67a7d7d244c05fc31e6f60c8daa9f9fa5d /man/systemd-battery-check.service.xml
parenttest: fix test_vxlan with the latest iproute2 (diff)
downloadsystemd-95dafd30da88bfeffdc3556dccc113709a13dbae.tar.xz
systemd-95dafd30da88bfeffdc3556dccc113709a13dbae.zip
battery-check: rework unit
Let's rename the unit to systemd-battery-check.service. We usually want to name our own unit files like our tools they wrap, in particular if they are entirely defined by us (i.e. not just wrappers of foreign concepts) While we are at it, also hook this in from initrd.target, and order it against initrd-root-device.target so that it runs before the root device is possibly written to (i.e. mounted or fsck'ed). This is heavily inspired by @aafeijoo-suse's PR #28208, but quite different ;-)
Diffstat (limited to 'man/systemd-battery-check.service.xml')
-rw-r--r--man/systemd-battery-check.service.xml72
1 files changed, 72 insertions, 0 deletions
diff --git a/man/systemd-battery-check.service.xml b/man/systemd-battery-check.service.xml
new file mode 100644
index 0000000000..2d9005696e
--- /dev/null
+++ b/man/systemd-battery-check.service.xml
@@ -0,0 +1,72 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="systemd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <refentryinfo>
+ <title>systemd-battery-check</title>
+ <productname>systemd</productname>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>systemd-battery-check.service</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>systemd-battery-check.service</refname>
+ <refname>systemd-battery-check</refname>
+ <refpurpose>Check battery level whether there's enough charge, and power off if not.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <para><filename>systemd-battery-check.service</filename></para>
+ <cmdsynopsis>
+ <command>/usr/lib/systemd/systemd-battery-check</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <filename>systemd-battery-check.service</filename> is used to check the battery level during the early
+ boot stage to determine whether there's sufficient battery power to carry on with the booting process.
+ </para>
+ <para>
+ <command>systemd-battery-check</command> returns success if the device is connected to an AC power
+ source or if the battery charge is greater than 5%. It returns failure otherwise.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>The following options are understood by <command>systemd-battery-check</command>:</para>
+
+ <variablelist>
+ <xi:include href="standard-options.xml" xpointer="help" />
+ <xi:include href="standard-options.xml" xpointer="version" />
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Exit status</title>
+
+ <para>
+ On success (running on AC power or battery capacity greater than 5%), 0 is returned, a non-zero failure
+ code otherwise.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>