]>
<!--
+ SPDX-License-Identifier: LGPL-2.1+
+
This file is part of systemd.
Copyright 2015 Zbigniew Jędrzejewski-Szmek
<refnamediv>
<refname>systemd.generator</refname>
- <refpurpose>Systemd unit generators</refpurpose>
+ <refpurpose>systemd unit generators</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsect1>
<title>Description</title>
- <para>Generators are small binaries that live in
- <filename>&usergeneratordir;/</filename> and other directories
- listed above.
- <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
- will execute those binaries very early at bootup and at
- configuration reload time — before unit files are loaded.
- Generators can dynamically generate unit files or create symbolic
- links to unit files to add additional dependencies, thus extending
- or overriding existing definitions. Their main purpose is to
- convert configuration files that are not native unit files
- dynamically into native unit files.</para>
+ <para>Generators are small executables that live in <filename>&systemgeneratordir;/</filename> and other
+ directories listed above.
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> will execute those
+ binaries very early at bootup and at configuration reload time — before unit files are loaded. Generators may
+ dynamically generate unit files (regular ones, instances as well as templates) and unit file
+ <filename>.d/</filename> drop-ins, or create symbolic links to unit files to add additional dependencies or
+ instantiate existing templates, thus extending or overriding existing definitions. Their main purpose is to convert
+ configuration files that are not native unit files dynamically into native unit files.</para>
<para>Generators are loaded from a set of paths determined during
compilation, as listed above. System and user generators are loaded
<para><parameter>normal-dir</parameter></para>
<para>argv[1] may be used to override unit files in
<filename>/usr</filename>, but not those in
- <filename>/etc</filename>. This means that unit files placed
+ <filename>/run</filename> or in <filename>/etc</filename>.
+ This means that unit files placed
in this directory take precedence over vendor unit
configuration but not over native user/administrator unit
configuration.</para>
<listitem>
<para><parameter>early-dir</parameter></para>
<para>argv[2] may be used to override unit files in
- <filename>/usr</filename> and in
+ <filename>/usr</filename>, in <filename>/run</filename> and in
<filename>/etc</filename>. This means that unit files placed
in this directory take precedence over all configuration,
both vendor and user/administrator.</para>
<listitem>
<para>
- Generators should only be used to generate unit files, not
- any other kind of configuration. Due to the lifecycle
- logic mentioned above, generators are not a good fit to
- generate dynamic configuration for other services. If you
- need to generate dynamic configuration for other services,
- do so in normal services you order before the service in
- question.
+ Generators should only be used to generate unit files and symlinks to them, not any other kind of
+ configuration. Due to the lifecycle logic mentioned above, generators are not a good fit to generate
+ dynamic configuration for other services. If you need to generate dynamic configuration for other services,
+ do so in normal services you order before the service in question.
</para>
</listitem>
<citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-sysv-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.environment-generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>