[systemd-devel] Running ldconfig at boot

Lennart Poettering lennart at poettering.net
Fri May 20 14:04:51 UTC 2016


On Fri, 20.05.16 15:55, Florian Weimer (fweimer at redhat.com) wrote:

> On 05/20/2016 02:59 PM, Lennart Poettering wrote:
> >On Fri, 20.05.16 14:01, Florian Weimer (fweimer at redhat.com) wrote:
> >
> >>The default systemd configuration runs ldconfig at boot.  Why?
> >
> >It's conditionalized via ConditionNeedsUpdate=, which means it is only
> >run when /etc is older than /usr. (This is tested via checking
> >modification times of /etc/.updated and /usr), see explanation on
> >systemd.unit(5).
> >
> >The usecase for this is to permit systems where a single /usr tree is
> >shared among multiple systems, and might be updated at any time, and
> >the changes need to be propagated to /etc on each individual
> >systems. The keyword is "stateless systems".
> 
> Do such systems need systemd configuration changes?

Not sure I understand this question?

> >Note that normally this should not be triggered at all, since this
> >only works on systems where /usr itsel is explicitly touched after
> >each updated so that the mtime is updated. That should normally not
> >happen, except when your distro is prepared for that, and does that
> >explicitly.
> 
> It happens if the filesystem package is upgraded.  I think this is what
> triggered the last mtime update on my workstation.
> 
> There are some more packages where installation or upgrades would update the
> /usr mtime.  I don't have a current Fedora rawhide list, but I'm attaching
> an older version.  The /usr mtime is not a reliable indicator for what you
> are trying to detect, I think.

Well, it really doesn't have to be. I mean, in the worst case we'll
run ldconfig once too often, which should be idempotent...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list