man: recommend that .network or friends should have a numeric prefix

Closes #23105.
This commit is contained in:
Yu Watanabe
2022-04-18 04:30:49 +09:00
parent bf93f24ad8
commit cc9b6bdc96
3 changed files with 49 additions and 31 deletions
+18 -12
View File
@@ -39,17 +39,22 @@
than create its own. Note that the settings of the pre-existing netdev will not be changed by
networkd.</para>
<para>The <filename>.netdev</filename> files are read from the files located in the system
network directory <filename>/usr/lib/systemd/network</filename>, the volatile runtime network
directory <filename>/run/systemd/network</filename> and the local administration network
directory <filename>/etc/systemd/network</filename>. All configuration files are collectively
sorted and processed in lexical order, regardless of the directories in which they live.
However, files with identical filenames replace each other. Files in <filename>/etc/</filename>
have the highest priority, files in <filename>/run/</filename> take precedence over files with
the same name in <filename>/usr/lib/</filename>. This can be used to override a system-supplied
configuration file with a local file if needed. As a special case, an empty file (file size 0)
or symlink with the same name pointing to <filename>/dev/null</filename> disables the
configuration file entirely (it is "masked").</para>
<para>The <filename>.netdev</filename> files are read from the files located in the system network
directory <filename>/usr/lib/systemd/network</filename> and
<filename>/usr/local/lib/systemd/network</filename>, the volatile runtime network directory
<filename>/run/systemd/network</filename> and the local administration network directory
<filename>/etc/systemd/network</filename>. All configuration files are collectively sorted and
processed in alphanumeric order, regardless of the directories in which they live. However, files
with identical filenames replace each other. It is recommended that each filename is prefixed with
a number (e.g. <filename>10-vlan.netdev</filename>). Otherwise, <filename>.netdev</filename> files
generated by
<citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
may take precedence over user configured files. Files in <filename>/etc/</filename> have the
highest priority, files in <filename>/run/</filename> take precedence over files with the same name
in <filename>/usr/lib/</filename>. This can be used to override a system-supplied configuration
file with a local file if needed. As a special case, an empty file (file size 0) or symlink with
the same name pointing to <filename>/dev/null</filename> disables the configuration file entirely
(it is "masked").</para>
<para>Along with the netdev file <filename>foo.netdev</filename>, a "drop-in" directory
<filename>foo.netdev.d/</filename> may exist. All files with the suffix <literal>.conf</literal>
@@ -2433,7 +2438,8 @@ Independent=yes</programlisting>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>