Re: Updating network file during boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 22 Aug 2024 at 09:59, Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:
On Thu, Aug 22, 2024 at 11:45 AM Henti Smith <henti@xxxxxxxxxxxxxxxxx> wrote:
...
>
> I attempted to match the network devices using Property= as follows (using debug1 as an example):
>
> # Fixed name for debug1 (Debug Board)
> [Match]
> Property=Path=pci-0000:01:00.0 ID_NET_DRIVER=igb
>

"Path" is not udev property.

Ahh thank you for pointing this out.
 
> udevadm info /sys/class/net/enp1s0
> P: /devices/pci0000:00/0000:00:0c.0/0000:01:00.0/net/enp1s0
> L: 0
> E: DEVPATH=/devices/pci0000:00/0000:00:0c.0/0000:01:00.0/net/enp1s0
> E: INTERFACE=enp1s0
> E: IFINDEX=2
> E: SUBSYSTEM=net
> E: USEC_INITIALIZED=4788144
> E: ID_NET_NAMING_SCHEME=v245
> E: ID_NET_NAME_MAC=enx00a0c9000000
> E: ID_OUI_FROM_DATABASE=Intel Corporation
> E: ID_NET_NAME_PATH=enp1s0
> E: ID_BUS=pci
> E: ID_VENDOR_ID=0x8086
> E: ID_MODEL_ID=0x1533
> E: ID_PCI_CLASS_FROM_DATABASE=Network controller
> E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
> E: ID_VENDOR_FROM_DATABASE=Intel Corporation
> E: ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection
> E: ID_PATH=pci-0000:01:00.0

"ID_PATH" is.


Further testing showed that "ID_PATH" Will not work either since both the first ethernet and the ethernet on the debug board will use the same PCI address and are both ID_NET_DRIVER=igb as well.
 
> E: ID_PATH_TAG=pci-0000_01_00_0
> E: ID_NET_DRIVER=igb
> E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
> E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp1s0
> E: TAGS=:systemd:
>

Also, you do not need to use Property for your match, it is just

[Match]
Path=pci-0000:01:00.0
Driver=igb

I'll experiment further with the "Property=" option since the "Path" does not include the bus ID which I need to match on. 

Thank you for pointing out my misunderstanding of the documentation.

Kind regards
Henti

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux