From: Fabian Vogt Date: Tue, 8 Aug 2023 10:52:53 +0000 (+0200) Subject: units/initrd-parse-etc.service: Conflict with emergency.target X-Git-Tag: v255-rc1~790 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=327cd2d3db703555f8d572b4cd055fbe55e1068b;p=thirdparty%2Fsystemd.git units/initrd-parse-etc.service: Conflict with emergency.target If emergency.target is started while initrd-parse-etc.service/start is queued, the initrd-parse-etc job did not get canceled. In parallel to the emergency units, it eventually runs the service, which starts initrd-cleanup.service, which in turn isolates initrd-switch-root.target. This stops the emergency units and effectively starts the initrd boot process again, which likely fails again like the initial attempt. The system is thus stuck in an endless loop, never really reaching emergency.target. With this conflict added, starting emergency.target automatically cancels initrd-parse-etc.service/start, avoiding the loop. --- diff --git a/units/initrd-parse-etc.service.in b/units/initrd-parse-etc.service.in index e592d3c2cb6..3dadab11236 100644 --- a/units/initrd-parse-etc.service.in +++ b/units/initrd-parse-etc.service.in @@ -15,6 +15,8 @@ DefaultDependencies=no Requires=initrd-root-fs.target After=initrd-root-fs.target +Conflicts=emergency.target + OnFailure=emergency.target OnFailureJobMode=replace-irreversibly