multi-user: do not use wants relationship
The multi-user target is run by systemd when the BMC first boots. It
contains all of the initial startup services. Some OpenBMC targets want
to ensure they are run after the multi-user target completes. A lot of
these targets did both a Wants and After relationship with multi-user.
The latest systemd, version 245, now takes that Wants relationship
seriously and will start any services within multi-user that are
stopped. This includes oneshot services which do not have the
"RemainAfterExit=yes" clause. If these services only expected to be run
once, as a part of multi-user, then they should include this clause but
you can see how they may expected to have only been run once.
The solution is twofold:
1) Fix the oneshot services that fall in the above scenario
2) Change the targets to not Wants=multi-user.target
1 will be changes throughout a few repositories.
2 is fixed in this commit.
Resolves openbmc/phosphor-state-manager#14
Tested:
Provided test image to George and he verified this fixed the above
issue
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I6eb7e5d2cb7d5a3c95f2e8ef6efc708dbb63fd52
diff --git a/target_files/obmc-power-stop@.target b/target_files/obmc-power-stop@.target
index fc22eb1..d19d941 100644
--- a/target_files/obmc-power-stop@.target
+++ b/target_files/obmc-power-stop@.target
@@ -2,7 +2,7 @@
Description=Power%i Off
Wants=obmc-power-stop-pre@%i.target
After=obmc-power-stop-pre@%i.target
-Wants=multi-user.target
+After=multi-user.target
Conflicts=obmc-chassis-poweron@%i.target
Conflicts=fsi-disable.service
RefuseManualStart=yes