summaryrefslogtreecommitdiff
path: root/rootfs/etc/systemd/system
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2021-04-24 23:14:42 +0100
committerSimon McVittie <smcv@debian.org>2021-04-25 11:17:50 +0100
commit44b845e83f8996732b6927b0d7108b35d072febd (patch)
treef70fec5a31be2ea64b7347c34b816d40c06482e1 /rootfs/etc/systemd/system
parent09805aa49bba104b329ad3ee4a60c6c00f27b611 (diff)
rootfs: Eliminate circular dependency between systemd units
rpi-reconfigure-raspi-firmware.service requires /boot/firmware to be mounted, but mounting local filesystems requires local-fs-pre.target, so trying to run rpi-reconfigure-raspi-firmware.service before local-fs-pre.target results in a cyclic order dependency. systemd breaks the cycle in an arbitrary place, and the result is unlikely to be what we want. Instead, delay reconfiguration of config.txt until after local filesystems are mounted, but before sysinit.target. This breaks the cycle (image-specs#49). This still orders it before all non-early-boot services, because sysinit.target is part of the DefaultDependencies; so in particular it will finish before rpi-generate-ssh-host-keys.service starts, which avoids the two services fighting over the dpkg lock (image-specs#45). Resolves: image-specs#45 Resolves: image-specs#49 Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'rootfs/etc/systemd/system')
-rw-r--r--rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service4
1 files changed, 2 insertions, 2 deletions
diff --git a/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service b/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service
index 529f01b..d8c5558 100644
--- a/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service
+++ b/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service
@@ -1,6 +1,6 @@
[Unit]
Description=Reconfigure raspi-firmware to regenerate config.txt matching actual hardware
-Before=local-fs-pre.target
+Before=sysinit.target
DefaultDependencies=no
RequiresMountsFor=/boot/firmware
@@ -11,4 +11,4 @@ ExecStart=/usr/sbin/dpkg-reconfigure raspi-firmware
ExecStart=/bin/systemctl --no-reload disable %n
[Install]
-RequiredBy=local-fs-pre.target
+RequiredBy=sysinit.target