1 |
On 24/08/14 15:59, Grant wrote: |
2 |
> I'm trying to define names for my USB network interfaces keyed on the |
3 |
> interface location instead of the interface MAC address. This udev |
4 |
> rule renames one of them: |
5 |
> |
6 |
> SUBSYSTEM=="net", KERNEL=="enp3s0u1", NAME="net0" |
7 |
> |
8 |
> But it doesn't work automatically at boot, I have to execute 'udevadm |
9 |
> trigger --action=add'. How can I execute that before the net.* |
10 |
> scripts at boot? |
11 |
> |
12 |
> - Grant |
13 |
> |
14 |
|
15 |
I'm not 100% convinced that's the right syntax to use. See, |
16 |
|
17 |
https://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=2#doc_chap4 |
18 |
|
19 |
|
20 |
Using your Own Names |
21 |
|
22 |
Code Listing 4.2: Setting the lan0 name for the current eth0 interface |
23 |
|
24 |
# vim /etc/udev/rules.d/76-net-name-use-custom.rules |
25 |
# Second one uses ID_NET_NAME_PATH information, and 76- number to be between |
26 |
# 75-net-*.rules and 80-net-*.rules |
27 |
SUBSYSTEM=="net", ACTION=="add", ENV{ID_NET_NAME_PATH}=="enp3s0u1", NAME="net0" |