summaryrefslogtreecommitdiff
path: root/units/systemd-update-done.service.in
Commit message (Collapse)AuthorAgeFilesLines
* meson: use jinja2 for unit templatesZbigniew Jędrzejewski-Szmek2021-05-191-1/+1
| | | | | | | | | We don't need two (and half) templating systems anymore, yay! I'm keeping the changes minimal, to make the diff manageable. Some enhancements due to a better templating system might be possible in the future. For handling of '## ' — see the next commit.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* Add SPDX license headers to unit filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+2
|
* readahead: wipe out readaheadDaniel Buch2014-09-251-1/+1
|
* man: document systemd-update-done.serviceLennart Poettering2014-07-011-1/+1
|
* units: drop RefuseManualStart= from a couple of update servicesLennart Poettering2014-06-161-2/+0
| | | | | | | | The only update service we really need to guard like this is systemd-tmpfiles-setup.service since if invoked manually might create /var/run/nologin and thus blocking the user from login. The other services are pretty much idempotent and don't suffer by this problem, hence let's simplify them.
* core: add new ConditionNeedsUpdate= unit conditionLennart Poettering2014-06-131-0/+2
| | | | | | | | | | | | | | | | | | | This new condition allows checking whether /etc or /var are out-of-date relative to /usr. This is the counterpart for the update flag managed by systemd-update-done.service. Services that want to be started once after /usr got updated should use: [Unit] ConditionNeedsUpdate=/etc Before=systemd-update-done.service This makes sure that they are only run if /etc is out-of-date relative to /usr. And that it will be executed after systemd-update-done.service which is responsible for marking /etc up-to-date relative to the current /usr. ConditionNeedsUpdate= will also checks whether /etc is actually writable, and not trigger if it isn't, since no update is possible then.
* update-done: add minimal tool to manage system updates for /etc and /var, if ↵Lennart Poettering2014-06-131-0/+21
/usr has changed In order to support offline updates to /usr, we need to be able to run certain tasks on next boot-up to bring /etc and /var in line with the updated /usr. Hence, let's devise a mechanism how we can detect whether /etc or /var are not up-to-date with /usr anymore: we keep "touch files" in /etc/.updated and /var/.updated that are mtime-compared with /usr. This means: Whenever the vendor OS tree in /usr is updated, and any services that shall be executed at next boot shall be triggered, it is sufficient to update the mtime of /usr itself. At next boot, if /etc/.updated and/or /var/.updated is older than than /usr (or missing), we know we have to run the update tools once. After that is completed we need to update the mtime of these files to the one of /usr, to keep track that we made the necessary updates, and won't repeat them on next reboot. A subsequent commit adds a new ConditionNeedsUpdate= condition that allows checking on boot whether /etc or /var are outdated and need updating. This is an early step to allow booting up with an empty /etc, with automatic rebuilding of the necessary cache files or user databases therein, as well as supporting later updates of /usr that then propagate to /etc and /var again.