diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-03-04 22:14:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 22:14:22 +0900 |
commit | 561f17a1e45d631953f18af7f0ef7ef2e6666fa5 (patch) | |
tree | 66b0380f0b328af5d501fcd9f0f623e6596a81f1 | |
parent | f482e22484229c22f06733530f3bb570d55bf367 (diff) | |
parent | 181d719542fb00ec4cc25d7f857cf82dae8e961f (diff) | |
download | systemd-561f17a1e45d631953f18af7f0ef7ef2e6666fa5.tar.gz |
Merge pull request #26668 from yuwata/man-link-rename
man: add/update example in systemd.link
-rw-r--r-- | man/systemd.link.xml | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/man/systemd.link.xml b/man/systemd.link.xml index aad3736c36..546a6a006b 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -1111,12 +1111,15 @@ <example> <title>/usr/lib/systemd/network/99-default.link</title> - <para>The link file <filename>99-default.link</filename> that is - shipped with systemd defines the default naming policy for - links.</para> + <para>The link file <filename>99-default.link</filename> that is shipped with systemd defines the + default policies for the interface name, alternative names, and MAC address of links.</para> - <programlisting>[Link] -NamePolicy=kernel database on-board slot path + <programlisting>[Match] +OriginalName=* + +[Link] +NamePolicy=keep kernel database onboard slot path +AlternativeNamesPolicy=database onboard slot path MACAddressPolicy=persistent</programlisting> </example> @@ -1134,7 +1137,24 @@ Name=dmz0</programlisting> <para><varname>NamePolicy=</varname> is not set, so <varname>Name=</varname> takes effect. We use the <literal>10-</literal> prefix to order this file early in the list. Note that it needs to be before - <literal>99-link</literal>, i.e. it needs a numerical prefix, to have any effect at all.</para> + <filename>99-default.link</filename>, i.e. it needs a numerical prefix, to have any effect at all.</para> + </example> + + <example> + <title>(Re-)applying a .link file to an interface</title> + + <para>After a new .link file has been created, or an exisiting .link file modified, the new settings + may be applied to the matching interface with the following commands:</para> + + <programlisting>$ sudo udevadm control --reload +$ sudo ip link set eth0 down +$ sudo udevadm trigger --verbose --settle --action add /sys/class/net/eth0</programlisting> + + <para>You may also need to stop the service that manages the network interface, e.g. + <filename>systemd-networkd.service</filename> or <filename>NetworkManager.service</filename> before + the above operation, and then restart the service after that. For more details about + <command>udevadm</command> command, see + <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> </example> <example> |