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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-09-14 13:00:43 +01:00
parent 3449814b8b
commit 5b5ec138c6

View File

@ -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