-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow-ups for e3d4148. - add reference to initrd-battery-check.service in man page, and move its section from 1 to 8, - add link to man page in help message, - introduce ERRNO_IS_NO_PLYMOUTH(), - propagate error in battery_check_send_plymouth_message(), - rename battery_check_send_plymouth_message() -> plymouth_send_message(), - return earlier when the first battery level check passed to reduce indentation, - fix potential use of invalid fd on battery restored, - do not use emoji for /dev/console, - add simple test (mostly for coverity), etc, etc...
- Loading branch information
Showing
7 changed files
with
161 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="initrd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
|
||
<refentryinfo> | ||
<title>systemd-battery-check</title> | ||
<productname>systemd</productname> | ||
</refentryinfo> | ||
|
||
<refmeta> | ||
<refentrytitle>initrd-battery-check.service</refentrytitle> | ||
<manvolnum>8</manvolnum> | ||
</refmeta> | ||
|
||
<refnamediv> | ||
<refname>initrd-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>initrd-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>initrd-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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ manpages = [ | |
['hostname', '5', [], ''], | ||
['hostnamectl', '1', [], 'ENABLE_HOSTNAMED'], | ||
['hwdb', '7', [], 'ENABLE_HWDB'], | ||
['initrd-battery-check.service', '8', ['systemd-battery-check'], ''], | ||
['integritytab', '5', [], 'HAVE_LIBCRYPTSETUP'], | ||
['iocost.conf', '5', [], ''], | ||
['journal-remote.conf', '5', ['journal-remote.conf.d'], 'HAVE_MICROHTTPD'], | ||
|
@@ -887,7 +888,6 @@ manpages = [ | |
''], | ||
['systemd-ask-password', '1', [], ''], | ||
['[email protected]', '8', ['systemd-backlight'], 'ENABLE_BACKLIGHT'], | ||
['systemd-battery-check', '1', [], ''], | ||
['systemd-binfmt.service', '8', ['systemd-binfmt'], 'ENABLE_BINFMT'], | ||
['systemd-bless-boot-generator', '8', [], 'ENABLE_BOOTLOADER'], | ||
['systemd-bless-boot.service', | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
set -eux | ||
set -o pipefail | ||
|
||
systemd-battery-check --help | ||
systemd-battery-check --version | ||
|
||
systemd-battery-check || : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters