From cc9b6bdc96e157e6ee9e4dc1d0a304a9df601564 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 18 Apr 2022 03:08:55 +0900 Subject: [PATCH] man: recommend that .network or friends should have a numeric prefix Closes #23105. --- man/systemd.link.xml | 35 +++++++++++++++++++++-------------- man/systemd.netdev.xml | 30 ++++++++++++++++++------------ man/systemd.network.xml | 15 ++++++++++----- 3 files changed, 49 insertions(+), 31 deletions(-) diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 5629057bf26..de23b941ad2 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -32,15 +32,19 @@ systemd.syntax7 for a general description of the syntax. - The link files are read from the files located in the system network directory - /usr/lib/systemd/network, the volatile runtime network directory + The .link files are read from the files located in the system network + directory /usr/lib/systemd/network and + /usr/local/lib/systemd/network, the volatile runtime network directory /run/systemd/network, and the local administration network directory - /etc/systemd/network. Link files must have the extension - .link; other extensions are ignored. All link 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 /etc/ have the highest - priority, files in /run/ take precedence over files with the same name in - /usr/lib/. This can be used to override a system-supplied link file with a + /etc/systemd/network. 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. 10-eth0.link). Otherwise, the default + .link files or those generated by + systemd-network-generator.service8 + may take precedence over user configured files. Files in /etc/ have the + highest priority, files in /run/ take precedence over files with the same name + in /usr/lib/. This can be used to override a system-supplied link 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 /dev/null disables the configuration file entirely (it is "masked"). @@ -71,13 +75,13 @@ [Match] Section Options - A link file is said to match a device if all matches specified by the - [Match] section are satisfied. When a link file does not contain valid settings - in [Match] section, then the file will match all devices and - systemd-udevd warns about that. Hint: to avoid the warning and to make it clear - that all interfaces shall be matched, add the following: + A link file is said to match an interface if all matches specified by the [Match] section are + satisfied. When a link file does not contain valid settings in [Match] section, then the file will + match all interfaces and systemd-udevd warns about that. Hint: to avoid the + warning and to make it clear that all interfaces shall be matched, add the following: OriginalName=* - The following keys are accepted: + The first (in alphanumeric order) of the link files that matches a given interface is applied, all + later files are ignored, even if they match as well. The following keys are accepted: