wspoon: Add cooling-type dep to fan control
With commit c184a0f08, the phosphor-hwmon instance for the max31785 fan
control device no longer waited for the cooling-type application to
finish before starting. Since the fan control service depends on the
phosphor-hwmon instance, it is now starting earlier than before, before
cooling-type, which was causing a crash.
To fix this, add the cooling-type dependency into the witherspoon fan
control service file.
Tested: Can see in the journal that fan control now starts after
phosphor-cooling-type, and it doesn't crash on a genesis reboot when the
inventory had previously been cleared.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I4bf9d8eb7f39acea71b790a61edfe1e8c4dae788
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service b/meta-ibm/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service
index 5e555a2..95c34d3 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service
@@ -2,6 +2,8 @@
Description=Phosphor Fan Control Daemon
Requires=xyz.openbmc_project.Hwmon@-ahb-apb-bus\x401e78a000-i2c\x2dbus\x40{ADDR}-max31785\x4052.service
After=xyz.openbmc_project.Hwmon@-ahb-apb-bus\x401e78a000-i2c\x2dbus\x40{ADDR}-max31785\x4052.service
+Requires=phosphor-cooling-type@%i.service
+After=phosphor-cooling-type@%i.service
[Service]
Restart=on-failure