Re: Updating network file during boot

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

 



On Thu, 15 Aug 2024 at 15:18, Silvio Knizek <killermoehre@xxxxxxx> wrote:
Am Donnerstag, dem 15.08.2024 um 14:57 +0100 schrieb Henti Smith:

> > Hi Henti,
> >
> > why can't you [Match] onto `Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller"`? Is your systemd older than 243? Than you should really update.
> >
> > BR 
> > Silvio

> Hi Silvio, 
>
> I'm on systemd 245 (Ubuntu focal) and I can likely match on Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller". I'll give that a test as well.
>
> My existing config is using Path=pci-0000:05:00.0 and that works, but when I try to match on Property=Path=pci-0000:05:00.0 Driver=oak,it doesn't. this doesn't make sense to me.
>
> I was hoping that I can have specific matches for hte PCI addresses and Drivers that I can use to match both sets of configuration with and without the hotplug board.
>
> Henti



Wait, what? I think, you have the property line wrong.

```ini 
[Match]
Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller"

[Link]
Name=onboard
```

and

```ini 
[Match] 
Property=!"ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller"
Driver=oak

[Link]
Name=oak-interface
```

Does this help?

BR 
Silvio


Hi Silvio. 

I cannot use  Property="ID_NET_LABEL_ONBOARD=Onboard ETHERNET Controller" as it will match the 3 or 4 (de pending on whether the PCIe hotplug board is attached) onboard network cards on the device.

The full device list (when configured correctly) is:
E: DEVPATH=/devices/pci0000:00/0000:00:0c.0/0000:01:00.0/net/eno1
E: DEVPATH=/devices/pci0000:00/0000:00:0d.0/0000:02:00.0/net/eth1
E: DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:05:00.0/net/mvc-sw1
E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/mvc-sw2

The eth1 device is the hotplug board.

The last two devices are the ones I'm trying to have consistent interface names regardless of the PCIe Ethernet card attached or not.

In the current configuration I had expected the match of Property=Path=pci-0000:05:00.0 Driver=oak to match mvc-sw1, but this does not work.

At the end of the day I need to be able to reliably identify the last two ethernet devices and name them correctly regardless of whether the additional PCI hotplug board is attached or not.

I was hoping that the combination of the Path and Driver information can be used to create 4 link files that would alternatively match the devices both with and without the PCIe hotplug board attached.

This seems to be the only way to reliably match the PCI bus state at boot time based on the man page.

I hope this clarifies the situation.

Kind regards
Henti

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

  Powered by Linux