]> git.ipfire.org Git - thirdparty/systemd.git/commit
imds-generator: replace static Condition=initrd by a check in the generator 42308/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Tue, 26 May 2026 08:15:26 +0000 (10:15 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 26 May 2026 12:58:53 +0000 (13:58 +0100)
commitc621879e35a681e816903779217515b79790685f
tree40cb6b8239c7c8fd790ab36a1c98236488b54054
parent3f33f4d057506970682e9de4eff06881d678f18a
imds-generator: replace static Condition=initrd by a check in the generator

After looking at the unit, I'm not sure if systemd-imds-import.service
is supposed to run in the host system or not. But if it is supposed to
only run in the initrd, then the static condition in the unit file gives
as the worst behaviour: the generator does not do any checks if we are
in the initrd or not, and if it enabled the unit, it'll influence the
transaction ordering (possibly causing loops or additional work) and
then the unit will be unconditionally skipped. So replace the static
condition by a check in the generator. If the user specifies
systemd.imds.import on the commandline, it'll be honoured also in the
host.
src/imds/imds-generator.c
units/systemd-imds-import.service.in