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
system identification data.</para>
<para>The basic file format of <filename>os-release</filename> is
a newline-separated list of environment-like shell-compatible
variable assignments. It is possible to source the configuration
from shell scripts, however, beyond mere variable assignments, no
shell features are supported (this means variable expansion is
explicitly not supported), allowing applications to read the file
without implementing a shell compatible execution engine. Variable
assignment values must be enclosed in double or single quotes if
they include spaces, semicolons or other special characters
outside of AZ, az, 09. Shell special characters ("$", quotes,
backslash, backtick) must be escaped with backslashes, following
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 basic file format of <filename>os-release</filename> is a newline-separated list of
environment-like shell-compatible variable assignments. It is possible to source the configuration from
Bourne shell scripts, however, beyond mere variable assignments, no shell features are supported (this
means variable expansion is explicitly not supported), allowing applications to read the file without
implementing a shell compatible execution engine. Variable assignment values must be enclosed in double
or single quotes if they include spaces, semicolons or other special characters outside of AZ, az,
09. (Assignments that do not include these special characters may be enclosed in quotes too, but this is
optional.) Shell special characters ("$", quotes, backslash, backtick) must be escaped with backslashes,
following shell style. All strings should be in UTF-8 encoding, 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
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, ".", "_"
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
<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>
</varlistentry>