diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:25:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:25:51 +0000 |
commit | ac8399db6ce846597966360732ce6d39a247bdd2 (patch) | |
tree | 046a28d2cbd02afa147291e8f69e9bb5dc29f1aa /debian/extra/rules/73-usb-net-by-mac.rules | |
parent | Adding upstream version 241. (diff) | |
download | systemd-ac8399db6ce846597966360732ce6d39a247bdd2.tar.xz systemd-ac8399db6ce846597966360732ce6d39a247bdd2.zip |
Adding debian version 241-7~deb10u8.debian/241-7_deb10u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/extra/rules/73-usb-net-by-mac.rules')
-rw-r--r-- | debian/extra/rules/73-usb-net-by-mac.rules | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/extra/rules/73-usb-net-by-mac.rules b/debian/extra/rules/73-usb-net-by-mac.rules new file mode 100644 index 0000000..20c3e84 --- /dev/null +++ b/debian/extra/rules/73-usb-net-by-mac.rules @@ -0,0 +1,20 @@ +# Use MAC based names for network interfaces which are directly or indirectly +# on USB and have an universally administered (stable) MAC address (second bit +# is 0). Don't do this when ifnames is disabled via kernel command line or +# customizing/disabling 99-default.link (or previously 80-net-setup-link.rules) +# or if the interface name was provided by user-space. + +ACTION=="remove", GOTO="usb_net_by_mac_end" +SUBSYSTEM!="net", GOTO="usb_net_by_mac_end" +ATTR{name_assign_type}=="3", GOTO="usb_net_by_mac_end" + +IMPORT{cmdline}="net.ifnames" +ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end" + +SUBSYSTEMS=="usb", NAME=="", \ + ATTR{address}=="?[014589cd]:*", \ + TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \ + TEST!="/etc/systemd/network/99-default.link", \ + IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}" + +LABEL="usb_net_by_mac_end" |