Hi Lennart, >>>> Moreover, if we >>>> give people this feature I'm pretty sure we'll get lots of people >>>> expecting it to work also for any other sort of name and getting >>>> confused when it doesn't. >>> >>> Well, this is something we can fix by documentation, no? >>> >>> Or maybe name the match option differently, maybe OriginalName= or >>> KernelName= or so, and then only matching interfaces where you know >>> that the name was selected by userspace in the first place? >> >> I like the idea of OriginalName, much less likely to get people >> confused. I now implemented that, with the restriction that we cannot >> match on renamed names. For now I left it open to match on ethX style >> names, as people in principle could do sensible things like >> "OriginalName=eth*" or even "OriginalName=eth0" when we know there is >> only one interface. >> >> One thing to consider would be to disallow renaming from a .link file >> where the OriginalName was used to match. That way we don't have the >> somewhat odd situation that a .link file can only be applied once (we >> do not remember the original name, so cannot match on that the second >> time around, as that would be a mess)... > > Maybe we should even store the original name in a udev property, so > that we can make this fully idempotent simply because we can always > check this new property for the original name passed down from the > kernel?
you do realize that once the kernel renamed the name, it is free to reuse that name again. So eth0 as OriginalName can then be present multiple times. I think that you can only have OriginalName matching if a renaming has never occurred. Otherwise this is really not deterministic. Since foo0 (renamed from eth0) and and bar0 (renamed from eth0) will both match OriginalName=eth0. The difference is only timing and that is inhering racy of course. Regards Marcel _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel