Commit Graph

3 Commits

Author SHA1 Message Date
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Lennart Poettering c7668c1ce0 units: make system-update-pre.target a passive unit (#9349)
This is an additional synchronization point normally not needed. Hence,
let's make it passive, i.e. pull it in from the unit which wants to be
ordered before the update service rather than by the update service
itself.
2018-06-20 12:46:18 +02:00
Hans de Goede 520741d08e units: Add new system-update-pre.target
systemd offline-updates allows dropping multiple system update units
to be added to system-update.target.wants.

As documented in systemd.offline-updates(7) only 1 of these units
should actually be active (based on the /system-update symlink) and
when that unit is done it should reboot the system.

In some cases it is desirable to run a unit whenever booting in
offline-updates mode indepedent of which update unit is going to
handle the update. One example of this is integration with bootloader
code which checks if the previous boot was succesful.

Since the active unit will reboot the system when it is done, there
is no guarantee that adding such a unit to system-update.target.wants
will get it executed always.

This commit adds a system-update-pre.target which can be used for
units which should always run when booting in offline-updates mode.
2018-06-19 13:42:19 +02:00