[systemd-devel] Updating network file during boot
Lennart Poettering
lennart at poettering.net
Wed Aug 21 16:12:05 UTC 2024
On Mi, 21.08.24 16:57, Henti Smith (henti at gaydonsmith.co.uk) wrote:
> cOn Fri, 16 Aug 2024 at 15:39, Henti Smith <henti at gaydonsmith.co.uk> wrote:
>
> > On Fri, 16 Aug 2024 at 07:31, Andrei Borzenkov <arvidjaar at gmail.com>
> > wrote:
> >
> >>
> >> echo 'SUBSYSTEM=="net", KERNELS=="0000:00:10.0", NAME="mvc-sw1"' >
> >> /etc/udev/rules.d/mvc.rules
> >> echo 'SUBSYSTEM=="net", KERNELS=="0000:00:11.0", NAME="mvc-sw2"' >>
> >> /etc/udev/rules.d/mvc.rules
> >>
> >
> > Thank you, this worked for me.
> >
> > I've updated my config to use the udev method, however can anybody explain
> > to me what I did wrong with the systemd.link method ?
> >
> > Based on the man page using Property=Path=pci-0000:05:00.0 Driver=oak
> > should have worked to match the PCI address and the driver should it not ?
> >
>
> Good day everybody.
>
> Thank you again for the solution as noted above
>
> 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.
Honestly, I'd really avoid mixing rename via udev rules and rename via
.link files. I'd stick to .link files for this, really.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list