73-usb-net-by-mac.rules 608 B

123456789101112131415
  1. # Use MAC based names for network interfaces which are directly or indirectly
  2. # on USB and have an universally administered (stable) MAC address (second bit
  3. # is 0). Don't do this when ifnames is disabled via kernel command line or
  4. # customizing/disabling 80-net-setup-link.rules.
  5. IMPORT{cmdline}="net.ifnames"
  6. ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
  7. ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
  8. ATTR{address}=="?[014589cd]:*", \
  9. TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
  10. IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
  11. LABEL="usb_net_by_mac_end"