]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: make sure that initrd-switch-root.service pulls in .target
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 Sep 2022 12:00:43 +0000 (13:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Sep 2022 12:59:11 +0000 (14:59 +0200)
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.

units/initrd-switch-root.service

index 9914d2640816e5f86aa2c5271e671202a9353a5f..b19b7bbc21e5d49ad78eda40b01db7527b17b123 100644 (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