diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-05-26 13:55:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-05-26 17:27:24 +0200 |
commit | aa6dc3ec337b04308a5dfe3b962fa88088b2c82e (patch) | |
tree | b79d8ca180902aed6ae8cee0f6376772590d67b1 /man/systemd.unit.xml | |
parent | Merge pull request #19729 from poettering/networkctl-netns-check (diff) | |
download | systemd-aa6dc3ec337b04308a5dfe3b962fa88088b2c82e.tar.xz systemd-aa6dc3ec337b04308a5dfe3b962fa88088b2c82e.zip |
man: fix list of escaped characters in unit names
The code works differently than the docs, and the code is right here.
Fix the doc hence.
See VALID_CHARS in unit-name.c for details about allowed chars in unit
names, but keep in mind that "-" and "\" are special, since generated by
the escaping logic: they are OK to show up in unit names, but need to be
escaped when converting foreign strings to unit names to make sure
things remain reversible.
Fixes: #19623
Diffstat (limited to 'man/systemd.unit.xml')
-rw-r--r-- | man/systemd.unit.xml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 0b5e869321..552ede51f5 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -273,10 +273,11 @@ objects in the file system hierarchy. Example: a device unit <filename>dev-sda.device</filename> refers to a device with the device node <filename index="false">/dev/sda</filename> in the file system.</para> - <para>The escaping algorithm operates as follows: given a string, any <literal>/</literal> character is replaced by - <literal>-</literal>, and all other characters which are not ASCII alphanumerics or <literal>_</literal> are - replaced by C-style <literal>\x2d</literal> escapes. In addition, <literal>.</literal> is replaced with such a - C-style escape when it would appear as the first character in the escaped string.</para> + <para>The escaping algorithm operates as follows: given a string, any <literal>/</literal> character is + replaced by <literal>-</literal>, and all other characters which are not ASCII alphanumerics, + <literal>:</literal>, <literal>_</literal> or <literal>.</literal> are replaced by C-style + <literal>\x2d</literal> escapes. In addition, <literal>.</literal> is replaced with such a C-style escape + when it would appear as the first character in the escaped string.</para> <para>When the input qualifies as absolute file system path, this algorithm is extended slightly: the path to the root directory <literal>/</literal> is encoded as single dash <literal>-</literal>. In addition, any leading, |