<div dir="auto"><div>I might be missing something, but... the systemd renaming is just another udev rule, one in 80-net-setup-link, isn't it? Rules for the same interface can't race with each other, they're processed linearly. (Rules for *different* interfaces can race but that happens regardless of the method.)</div><div dir="auto"><br></div><div dir="auto">Last I checked, the udev rule that applies .link files is supposed to honor a previously set NAME=, and any rules that set NAME= after systemd should just override it as usual.</div><div dir="auto"><br></div><div dir="auto">That said, because the enp* naming is done by .link files, it doesn't make sense to have a .link file reference an /sys/enp* DEVPATH because at that point in time, the enp* naming hasn't been applied yet... this is not a race, quite the opposite – you're trying to make thing X conditional on the result of same thing X.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2024, 11:22 Henti Smith <<a href="mailto:henti@gaydonsmith.co.uk" target="_blank" rel="noreferrer">henti@gaydonsmith.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Aug 2024 at 19:07, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" rel="noreferrer noreferrer" target="_blank">arvidjaar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 22.08.2024 16:56, Henti Smith wrote:<br>> I've switched to using "Property=" as follows:<br>
> # Fixed MAC and name for enp6s0 (Block Diagram) when debug board is not<br>
> plugged in<br>
> # Renamed to mvc-sw2 by PCI Address.<br>
> [Match]<br>
> <br>
> Property=DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:05:00.0/net/enp5s0<br>
> <br>
> [Link]<br>
> MACAddress=02:00:00:00:06:00<br>
> Name=mvc-sw2<br>
> <br>
> However this is also inconsistent:<br>
<br>
What systemd version?<br>
<br></blockquote><div><br></div><div>Ubuntu focal : 245.4-4ubuntu3.23</div><div> </div><div>We will be moving to Jammy in the near future. <br></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">I'm going to attempt using UDEV for device naming again and see if I can find a way to stop systemd from renaming devices, which is what happened before. <br></div><div class="gmail_quote"><br></div><div class="gmail_quote">If there are any pointers on using either exclusively UDEV or link files to manage device naming without them UDEV and systemd clobbering each other, it will be very welcome. <br></div><div class="gmail_quote"><br></div><div class="gmail_quote"></div><div class="gmail_quote">Henti<br></div></div>
</blockquote></div></div></div>