summaryrefslogtreecommitdiffstats
path: root/units/systemd-boot-update.service
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-07-04 22:31:11 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-07-05 03:58:47 +0200
commit49c55abcbefd737bcd47b3ae6105e9bdf831cc6b (patch)
tree70845ba1afa3760bf7cb45d90942d0fd0ef2677a /units/systemd-boot-update.service
parentjournal-remote: upload journals from namespace (diff)
downloadsystemd-49c55abcbefd737bcd47b3ae6105e9bdf831cc6b.tar.xz
systemd-49c55abcbefd737bcd47b3ae6105e9bdf831cc6b.zip
units: condition out a few services in the initrd
Let's make our units more robust to being added to an initrd: 1. systemd-boot-update only makes sense if sd-boot is available in /usr/ to copy into the ESP. This is generally not the case in initrds, and even if it was, we shouldn't update the ESP from the initrd, but from the host instead. 2. The rfkill services save/restore rfkill state, but that information is only available once /var/ is mounted, which generally happens after the initrd transition. 3. utmp management is partly in /var/, and legacy anyway, hence don't bother with it in the initrd.
Diffstat (limited to 'units/systemd-boot-update.service')
-rw-r--r--units/systemd-boot-update.service1
1 files changed, 1 insertions, 0 deletions
diff --git a/units/systemd-boot-update.service b/units/systemd-boot-update.service
index ce9187bbfe..f234184d78 100644
--- a/units/systemd-boot-update.service
+++ b/units/systemd-boot-update.service
@@ -10,6 +10,7 @@
[Unit]
Description=Automatic Boot Loader Update
Documentation=man:bootctl(1)
+ConditionPathExists=!/etc/initrd-release
DefaultDependencies=no
After=local-fs.target