On Thu, 21.04.16 17:49, Clemens Gruber ([email protected]) wrote:
> Hi, > > I have the following problem: I use systemd-networkd on an embedded ARM > board but we have several different network usecases (with or without > VLAN trunking, etc.) which need to be configurable. > > Until now, I tried to create a KernelCommandLine Match constraint to > control which .network and .netdev files are used for an interface, but > it's obviously not a good solution as a change requires a reboot. > > What do you think about creating a Profile= or ProfileName= match > constraint for .net* files and let the user switch between profiles > through networkctl ? Well, currently networkctl is fully passive, and networkd provides exactly zero calls for changing its state. To add APIs like this is high on our TODO list however. I personally cannot say I am a fan of the "profile" concept in general, even though it has been requested a number of times before. However, I think that shouldn't stop you from implementing something like this, and I think you can do this relatively easily without direct support in networkd. For example, you could place your choice of .network files somewhere, and then write a short script that symlinks them depending on the profile to use in /run/systemd/network/, and restart networkd. That script could even use /dev/null masking to mask out some default config in some profiles, so that you can relatively easily build something that comes up with some default config, but by running that script disables some .network files and adds in others instead. I hope this makes sense? Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
