>> 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?
>>
>> - Grant
>>
>
> I'm not 100% convinced that's the right syntax to use. See,
>
> https://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=2#doc_chap4
>
>
> Using your Own Names
>
> Code Listing 4.2: Setting the lan0 name for the current eth0 interface
>
> # vim /etc/udev/rules.d/76-net-name-use-custom.rules
> # Second one uses ID_NET_NAME_PATH information, and 76- number to be between
> # 75-net-*.rules and 80-net-*.rules
> SUBSYSTEM=="net", ACTION=="add", ENV{ID_NET_NAME_PATH}=="enp3s0u1", 
> NAME="net0"


Works perfectly!  Thank you Samuli!

- Grant

Reply via email to