On Sun, Aug 24, 2014 at 8:59 AM, Grant <emailgr...@gmail.com> wrote: > > I'm trying to define names for my USB network interfaces keyed on the > interface location instead of the interface MAC address. This udev > rule renames one of them: > > SUBSYSTEM=="net", KERNEL=="enp3s0u1", NAME="net0" > > But it doesn't work automatically at boot, I have to execute 'udevadm > trigger --action=add'. How can I execute that before the net.* > scripts at boot?
"enp3s0u1" isn't a kernel name; it's an "ID_NET_NAME_PATH" attribute. I use the following on my laptop: $ cat /etc/udev/rules.d/85-net-name.rules SUBSYSTEM=="net", ACTION=="add", KERNEL=="eth*", ATTR{address}=="28:D2:44:0E:2F:53", NAME="wire" SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", ATTR{address}=="68:17:29:4B:26:5C", NAME="wifi" The rule that used to create 70-persistent-net.rules added DRIVERS=="?*" ATTR{dev_id}=="0x0" ATTR{type}=="1" but udev doen't seem to need them.