1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-02 09:47:03 +03:00

man: extend os-release docs a bit regarding quotes

Fixes: #21194
This commit is contained in:
Lennart Poettering 2021-11-08 18:19:43 +01:00 committed by Luca Boccassi
parent e2de2d28f4
commit 5c12ee3656

View File

@ -35,22 +35,17 @@
<filename>/usr/lib/os-release</filename> files contain operating <filename>/usr/lib/os-release</filename> files contain operating
system identification data.</para> system identification data.</para>
<para>The basic file format of <filename>os-release</filename> is <para>The basic file format of <filename>os-release</filename> is a newline-separated list of
a newline-separated list of environment-like shell-compatible environment-like shell-compatible variable assignments. It is possible to source the configuration from
variable assignments. It is possible to source the configuration Bourne shell scripts, however, beyond mere variable assignments, no shell features are supported (this
from shell scripts, however, beyond mere variable assignments, no means variable expansion is explicitly not supported), allowing applications to read the file without
shell features are supported (this means variable expansion is implementing a shell compatible execution engine. Variable assignment values must be enclosed in double
explicitly not supported), allowing applications to read the file or single quotes if they include spaces, semicolons or other special characters outside of AZ, az,
without implementing a shell compatible execution engine. Variable 09. (Assignments that do not include these special characters may be enclosed in quotes too, but this is
assignment values must be enclosed in double or single quotes if optional.) Shell special characters ("$", quotes, backslash, backtick) must be escaped with backslashes,
they include spaces, semicolons or other special characters following shell style. All strings should be in UTF-8 encoding, and non-printable characters should not
outside of AZ, az, 09. Shell special characters ("$", quotes, be used. It is not supported to concatenate multiple individually quoted strings. Lines beginning with
backslash, backtick) must be escaped with backslashes, following "#" shall be ignored as comments. Blank lines are permitted and ignored.</para>
shell style. All strings should be in UTF-8 format, and
non-printable characters should not be used. It is not supported
to concatenate multiple individually quoted strings. Lines
beginning with "#" shall be ignored as comments. Blank lines are
permitted and ignored.</para>
<para>The file <filename>/etc/os-release</filename> takes <para>The file <filename>/etc/os-release</filename> takes
precedence over <filename>/usr/lib/os-release</filename>. precedence over <filename>/usr/lib/os-release</filename>.
@ -153,7 +148,8 @@
<listitem><para>A lower-case string (no spaces or other characters outside of 09, az, ".", "_" <listitem><para>A lower-case string (no spaces or other characters outside of 09, az, ".", "_"
and "-") identifying the operating system, excluding any version information and suitable for and "-") identifying the operating system, excluding any version information and suitable for
processing by scripts or usage in generated filenames. If not set, a default of processing by scripts or usage in generated filenames. If not set, a default of
<literal>ID=linux</literal> may be used.</para> <literal>ID=linux</literal> may be used. Note that even though this string may not include
characters that require shell quoting, quoting may nevertheless be used.</para>
<para>Examples: <literal>ID=fedora</literal>, <literal>ID=debian</literal>.</para></listitem> <para>Examples: <literal>ID=fedora</literal>, <literal>ID=debian</literal>.</para></listitem>
</varlistentry> </varlistentry>