Le jeu. 15 août 2024, 05:03, Henti Smith <henti@xxxxxxxxxxxxxxxxx> a écrit :
Hello EtienneI cannot find any info on how to extract this information from the current system.How would I go about doing that ?
Try
cat /sys/devices/pci0000:00/0000:00:10.0/0000:05:00.0/firmware_node/sun
cat /sys/devices/pci0000:00/0000:00:10.0/firmware_node/sun
Kind regardsHentiOn Tue, 13 Aug 2024 at 17:56, Etienne Champetier <champetier.etienne@xxxxxxxxx> wrote:Hello Henti,
Le mar. 13 août 2024 à 12:16, Henti Smith <henti@xxxxxxxxxxxxxxxxx> a écrit :
>
> Good day everybody.
>
> I've searched high and low and cannot seem to find an answer for what I'm trying to do. The most relevant I found was this [1] thread in 2020, but only because I'm using a script to change the contents of my .link files during boot, which is not working constantly.
>
> Some things to note:
> 1. The hardware is sample hardware so Mac addresses are 00:00:00:00:00.
> 2. The hardware has an external hot-swap PCId port that takes a board for VGA out.
> 3. We're attempting to configure two interfaces.
>
> The problem is when the board is attached the PCI numbering of the two interfaces change. With the board attached, it's 5 and 6, without it 4 and 5.
>
> Normally this would not be a problem, since you can Match on mac address, but in this case, both have the same mac address of 00:00:00:00:00.
>
> My attempt to fix this was to create a script [2] that enumerated the PCI ports for the hardware manufacturer and use that information to update the link files [2] before systemd-networkd starts, but this does not work constantly.
>
> Are there any other recommendations to resolve this situation or if my approach is the only real way to do this, how can I ensure my script is executed before systemd uses the link files to apply the interface configuration ?
Does the platform provide ACPI _SUN info by any chance ?
https://github.com/systemd/systemd/pull/33682
Best
Etienne
>
> [1] https://lists.freedesktop.org/archives/systemd-devel/2020-June/044784.html
> [2] https://paste.mozilla.org/jgcCyo9A
> [3] https://paste.mozilla.org/zXQYpXpd
>
> Any guidance would be most welcome.
>
> Kind regards
> Henti Smith