On Fri, Apr 11, 2014 at 2:56 AM, Lennart Poettering <[email protected]> wrote: > On Sat, 05.04.14 11:26, Tom Gundersen ([email protected]) wrote: > >> >> On Sat, Apr 5, 2014 at 12:43 AM, Leonid Isaev <[email protected]> wrote: >> > I seem to have a strange issue with the way networkd processes its >> > configuration files. The machine is actually a systemd-nspawn container >> > with >> > a static IP address, so I had to mask the default >> > 80-container-host0.network >> > and create a custom config. Both real and virtual machines are up-to-date >> > archlinux [testing] installations. >> >> So the best way to do this is to name your custom config file either >> the same as what you are overriding (if the overridden file should >> anyway never be used, which is the case for what you describe), or >> simply name it starting with a lower number. That way the first >> matching file will be applied. >> >> The 'masking' logic that you know from unit files does not really make >> much sense for .network files (but maybe this is something we should >> change...). Symlinks to /dev/null are just treated as empty .network >> files, so their meaning is "no [Match] section", which matches >> everything and "no [Network] section", which does nothing. I suppose >> this may be used to express "ignore any subsequent .network files", >> but I doubt that is a particularly useful thing to do. > > I am pretty masking one unit file should not have the effect that all > lexicographically later ones also get masked. Masking should always be > local, a tool to get rid of one entry only, not all of them. > > I'd strongly recommend to make sure that networkd uses util.c's > null_or_empty() call to detect whether a .network file is masked, and > then just skip over it, continuing with the next one.
Yes, makes sense. I just pushed a patch implementing masking for .link, .network and .netdev files. Cheers, Tom _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
