[systemd-devel] Running ldconfig at boot

Florian Weimer fweimer at redhat.com
Fri May 20 13:55:27 UTC 2016


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?

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

Florian
-------------- next part --------------
                         nevra                          |          name           
--------------------------------------------------------+-------------------------
 arm-none-eabi-binutils-cs-2014.05.28-3.fc22.x86_64     | /usr/arm-none-eabi
 arm-none-eabi-newlib-2.1.0-5.fc21.noarch               | /usr/arm-none-eabi
 avr-binutils-1:2.24-4.fc22.x86_64                      | /usr/avr
 avr-libc-1.8.0-9.fc21.noarch                           | /usr/avr
 cinnamon-control-center-filesystem-2.4.2-1.fc22.i686   | /usr/share
 cinnamon-control-center-filesystem-2.4.2-1.fc22.x86_64 | /usr/share
 filesystem-3.2-32.fc22.x86_64                          | /usr/bin
 filesystem-3.2-32.fc22.x86_64                          | /usr/games
 filesystem-3.2-32.fc22.x86_64                          | /usr/include
 filesystem-3.2-32.fc22.x86_64                          | /usr/lib
 filesystem-3.2-32.fc22.x86_64                          | /usr/lib64
 filesystem-3.2-32.fc22.x86_64                          | /usr/libexec
 filesystem-3.2-32.fc22.x86_64                          | /usr/local
 filesystem-3.2-32.fc22.x86_64                          | /usr/sbin
 filesystem-3.2-32.fc22.x86_64                          | /usr/share
 filesystem-3.2-32.fc22.x86_64                          | /usr/src
 krb5-appl-clients-1.0.3-9.fc22.x86_64                  | /usr/kerberos
 krb5-appl-servers-1.0.3-9.fc22.x86_64                  | /usr/kerberos
 mingw32-filesystem-99-5.fc21.noarch                    | /usr/i686-w64-mingw32
 mingw64-filesystem-99-5.fc21.noarch                    | /usr/x86_64-w64-mingw32
 msp430-binutils-2.21.1a-8.fc22.x86_64                  | /usr/msp430
 nqp-jvm-0.0.2014.04-3.fc22.noarch                      | /usr/languages
 nqp-moar-0.0.2014.04-3.fc22.x86_64                     | /usr/languages
 sblim-cmpi-network-1.4.0-13.fc22.i686                  | /usr/share
 sblim-cmpi-network-1.4.0-13.fc22.x86_64                | /usr/share
(25 rows)



More information about the systemd-devel mailing list