[systemd-devel] Running ldconfig at boot

Lennart Poettering lennart at poettering.net
Fri May 20 12:59:07 UTC 2016


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".

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.

Hence, in your case, any idea how it happens that your /usr got its
mtime updated?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list