diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-08-30 13:52:33 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-08-30 13:55:55 +0200 |
commit | 13dcc96ffb02041018f15e6fff3979ff933ca624 (patch) | |
tree | 4bcdc2eb853fe7f2c0af2501e2355d163fe26f8d /man | |
parent | 153d5975751aab58c3c4cdfdbe13ea7187c16e28 (diff) | |
download | systemd-13dcc96ffb02041018f15e6fff3979ff933ca624.tar.gz |
docs: describe valid unit names in systemd.unit(5)
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.unit.xml | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 8307be1d33..acb09d005d 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -104,16 +104,24 @@ <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>. </para> - <para>Unit files are loaded from a set of paths determined during - compilation, described in the next section.</para> - - <para>Unit files can be parameterized by a single argument called the "instance name". The unit - is then constructed based on a "template file" which serves as the definition of multiple - services or other units. A template unit must have a single <literal>@</literal> at the end of - the name (right before the type suffix). The name of the full unit is formed by inserting the - instance name between <literal>@</literal> and the unit type suffix. In the unit file itself, - the instance parameter may be referred to using <literal>%i</literal> and other specifiers, see - below.</para> + <para>Unit files are loaded from a set of paths determined during compilation, described in the next + section.</para> + + <para>Valid unit names consist of a "name prefix" and a dot and a suffix specifying the unit type. The + "unit prefix" must consist of one or more valid characters (ASCII letters, digits, <literal>:</literal>, + <literal>-</literal>, <literal>_</literal>, <literal>.</literal>, and <literal>\</literal>). The total + length of the unit name including the suffix must not exceed 256 characters. The type suffix must be one + of <literal>.service</literal>, <literal>.socket</literal>, <literal>.device</literal>, + <literal>.mount</literal>, <literal>.automount</literal>, <literal>.swap</literal>, + <literal>.target</literal>, <literal>.path</literal>, <literal>.timer</literal>, + <literal>.slice</literal>, or <literal>.scope</literal>.</para> + + <para>Units names can be parameterized by a single argument called the "instance name". The unit is then + constructed based on a "template file" which serves as the definition of multiple services or other + units. A template unit must have a single <literal>@</literal> at the end of the name (right before the + type suffix). The name of the full unit is formed by inserting the instance name between + <literal>@</literal> and the unit type suffix. In the unit file itself, the instance parameter may be + referred to using <literal>%i</literal> and other specifiers, see below.</para> <para>Unit files may contain additional options on top of those listed here. If systemd encounters an unknown option, it will |