[systemd-devel] Updating network file during boot

Andrei Borzenkov arvidjaar at gmail.com
Thu Aug 22 08:59:22 UTC 2024


On Thu, Aug 22, 2024 at 11:45 AM Henti Smith <henti at gaydonsmith.co.uk> 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.

> [Link]
> Name=debug1
>
> However, this did not work as expected, and the device was configured with /usr/lib/systemd/network/99-default.link instead:
>
> 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.

> 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


More information about the systemd-devel mailing list