From: Zbigniew Jędrzejewski-Szmek Date: Wed, 14 Sep 2022 12:00:43 +0000 (+0100) Subject: units: make sure that initrd-switch-root.service pulls in .target X-Git-Tag: v252-rc1~164^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b5ec138c65d587ecac1be5790ab9854e49a0446;p=thirdparty%2Fsystemd.git units: make sure that initrd-switch-root.service pulls in .target Normally we queue initrd-switch-root.target/isolate, which pulls in the service via Wants= in the .target unit file. But if the service is instead started directly, there may be nothing pulling in the target. Let's make sure that the reference exists. --- diff --git a/units/initrd-switch-root.service b/units/initrd-switch-root.service index 9914d264081..b19b7bbc21e 100644 --- a/units/initrd-switch-root.service +++ b/units/initrd-switch-root.service @@ -13,6 +13,7 @@ Description=Switch Root AssertPathExists=/etc/initrd-release DefaultDependencies=no +Wants=initrd-switch-root.target AllowIsolate=yes OnFailure=emergency.target OnFailureJobMode=replace-irreversibly