From: Lennart Poettering Date: Mon, 8 Nov 2021 17:19:43 +0000 (+0100) Subject: man: extend os-release docs a bit regarding quotes X-Git-Tag: v250-rc1~334 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c12ee3656a1fda84188f772790933e8c98168e6;p=thirdparty%2Fsystemd.git man: extend os-release docs a bit regarding quotes Fixes: #21194 --- diff --git a/man/os-release.xml b/man/os-release.xml index 15608c437a3..ef5ef8b2e14 100644 --- a/man/os-release.xml +++ b/man/os-release.xml @@ -35,22 +35,17 @@ /usr/lib/os-release files contain operating system identification data. - The basic file format of os-release 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. + The basic file format of os-release 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. The file /etc/os-release takes precedence over /usr/lib/os-release. @@ -153,7 +148,8 @@ 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 - ID=linux may be used. + ID=linux may be used. Note that even though this string may not include + characters that require shell quoting, quoting may nevertheless be used. Examples: ID=fedora, ID=debian.