1
0
mirror of https://github.com/rancher/os.git synced 2025-08-20 07:42:55 +00:00
os/images/01-base/usr/lib/udev/rules-extras.d/73-usb-net-by-mac.rules
2018-12-07 14:23:06 +08:00

15 lines
608 B
Plaintext

# 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 80-net-setup-link.rules.
IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
ATTR{address}=="?[014589cd]:*", \
TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"