[systemd-devel] [PATCH] resolved: Move symlink creation from tmpfiles to daemon runtime

Lennart Poettering lennart at poettering.net
Mon Jul 7 12:19:40 PDT 2014


On Mon, 07.07.14 10:59, Colin Walters (walters at verbum.org) wrote:

> > And of course, it's the most reasonable thing to do really, as in
> > today's world it's populated dynamically from DHCP more often than not,
> > and hence more runtime material than static configuration material.
> 
> I agree.  But...

In order to be a bit constructive I have now filed an RFE bug against
NM, asking them to move their resolv.conf to /run and make
/etc/resolv.conf a symlink.

https://bugzilla.redhat.com/show_bug.cgi?id=1116999

> > Humm, well, NM really shouldn't write around in /etc all the time.
> 
> This is Anaconda, not NM, though its goal is to propagate network
> configuration from the runtime system to the target which is using
> NetworkManager and most specifically redhat initscripts ifcfg files.

Yupp, I got that. But anaconda should be smart enough to not follow
symlinks in this case, and simply replace them.

> > I really don't see anything to fix here in systemd. Anaconda should be
> > fixed.
> 
> Two things:
> 
> First, there's the case where resolved is compiled out; right now
> systemd is unconditionally creating the link.  This patch addresses that
> as well.

Well, it's not unconditionally creating the link. It's only creating the
link if the file doesn't exist yet.

I do admit though that it might make sense to cover the  tmpfiles line
under the compile-time switch for networkd, so that people who build
systemd without networkd won't get it. But this wouldn't really help
fedora, as networkd is compiled, we just don't enable it by default.

> Now for the Fedora case, we're really talking about quite a number of
> system creation tools that are not ready for this.  This is also
> reflected in the fact that the systemd unit file is disabled by
> default.

Well, it's rawhide, which is where these issues should be fixed. Sooner
or later they really should fix this anyway, I don't really see what is
gained by brushing this under the carpet...

> We could carry the patch downstream I guess.  Or maybe this gets more
> into a case where we want parts of tmpfiles.d snippets tied to services
> being enabled, not just installed.

I think it would be best to fix anaconda and the other tools instead. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list