[systemd-devel] Updating network file during boot

Andrei Borzenkov arvidjaar at gmail.com
Thu Aug 22 11:45:13 UTC 2024


On Wed, Aug 21, 2024 at 7:12 PM Lennart Poettering
<lennart at poettering.net> wrote:
...
> >
> > After adding some more network devices to udev this way I now have the same
> > udev configuration working intermittently and I'm not sure why.
>
> You are probably racing against the usual rename logic via .link
> devices if you rename via udev rules. You need to disable the policy
> via a .link file.
>

AFAICT interface (re-)naming is only done by udevd (ignoring
systemd-nspawn for the moment). What exactly is racing with what?

> Honestly, I'd really avoid mixing rename via udev rules and rename via
> .link files. I'd stick to .link files for this, really.
>

All .link files do is to suggest the "best" name which is ignored if
NAME has already been set. They do not really rename anything
themselves. Besides, OP cannot use .link files because there is no
persistent device property that can be matched by them.

It is possible that there are conflicting rules in initrd. It is also
possible that udev races with the networkd.


More information about the systemd-devel mailing list