[systemd-devel] Updating network file during boot
Mantas Mikulėnas
grawity at gmail.com
Fri Aug 23 09:43:57 UTC 2024
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.)
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.
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.
On Fri, Aug 23, 2024, 11:22 Henti Smith <henti at gaydonsmith.co.uk> wrote:
> On Thu, 22 Aug 2024 at 19:07, Andrei Borzenkov <arvidjaar at gmail.com>
> wrote:
>
>> On 22.08.2024 16:56, Henti Smith wrote:
>> > I've switched to using "Property=" as follows:
>> > # Fixed MAC and name for enp6s0 (Block Diagram) when debug board
>> is not
>> > plugged in
>> > # Renamed to mvc-sw2 by PCI Address.
>> > [Match]
>> >
>> >
>> Property=DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:05:00.0/net/enp5s0
>> >
>> > [Link]
>> > MACAddress=02:00:00:00:06:00
>> > Name=mvc-sw2
>> >
>> > However this is also inconsistent:
>>
>> What systemd version?
>>
>>
> Ubuntu focal : 245.4-4ubuntu3.23
>
> We will be moving to Jammy in the near future.
>
> 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.
>
> 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.
>
> Henti
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240823/c857ce47/attachment.htm>
More information about the systemd-devel
mailing list