[systemd-devel] Running ldconfig at boot

Florian Weimer fweimer at redhat.com
Fri May 20 14:06:46 UTC 2016


On 05/20/2016 04:04 PM, Lennart Poettering wrote:
> 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?

If such systems require specialized unit files, then you can put 
ldconfig.service there, instead of exposing all systemd users to the 
service.

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

As I explained, the way you run it, it is not necessarily idempotent.

Florian



More information about the systemd-devel mailing list