]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: extend os-release docs a bit regarding quotes
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Nov 2021 17:19:43 +0000 (18:19 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 8 Nov 2021 18:21:00 +0000 (18:21 +0000)
Fixes: #21194
man/os-release.xml

index 15608c437a390b3e1e242c91cadb5127a797d559..ef5ef8b2e143addbe7643f9023120b464bc9f390 100644 (file)
     <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 A–Z, a–z, 0–9. 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 A–Z, a–z,
+    0–9. (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>.
           <listitem><para>A lower-case string (no spaces or other characters outside of 0–9, a–z, ".", "_"
           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>