On Wed, Feb 18, 2015 at 9:10 PM, Giancarlo Razzolini <[email protected]> wrote: > I am currently the maintainer and developer for some archlinux > initramfs tools that deals with early userspace network. More precisely, > I do develop/maintain these hooks: > > https://aur.archlinux.org/packages/dropbear_initrd_encrypt/ > https://aur.archlinux.org/packages/mkinitcpio-ppp/ > > The first make use of the ip= kernel command line parameter and the > latter directly manipulate the desired interface using custom kernel > parameters. But, in both cases, I need to flush the interface and set it > status to DOWN before the initramfs handle the init to systemd. I took a > look at the: src/udev/udev-builtin-net_id.c file and it seems indeed > that it won't rename an interface that is UP. An error is shown in the > journalctl by udev saying the interface couldn't be renamed. I do handle > with this already, but I was wondering if systemd-udevd shouldn't rename > the interface regardless of it state, since the early userspace > interface configuration shouldn't matter after the root is pivoted and > systemd is started. This could be the default or even configurable. What > are your thoughts on this?
We cannot (in udev) put an interface DOWN, as there is probably some reason it was UP in the first place. Maybe your rootfs is nfs, or some other such crucial service is running over the link. As the link cannot be brought down the kernel will not allow us to rename it. Moreover, we shouldn't be renaming an in-use interface anyway. The intended use of the rename logic is that links are renamed exactly once, and that is before they are ever used by userspace. If you use the links in the initrd then any renaming should be happening in the initrd before the links are used. Anything else will not be safe. I hope that makes sense. Cheers, Tom _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
