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