Add phosphor-fan-monitor init service
Updated the phosphor-fan-monitor service file to invoke the fan
monitoring application in 'monitor' mode (actively updating the
functional states of fans).
Created a phosphor-fan-monitor-init service to invoke the fan monitoring
application in 'init' mode where the fans are set to functional, such as
at poweron.
Resolves openbmc/openbmc#2187
Change-Id: If6d1763d69d69f55b7c69bd8b6496f6c9af70589
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service b/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service
new file mode 100644
index 0000000..a01acad
--- /dev/null
+++ b/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor Fan Monitor Initialization
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Conflicts=obmc-chassis-poweroff@%i.target
+
+[Service]
+Restart=on-failure
+ExecStart=/usr/bin/env phosphor-fan-monitor --init
+SyslogIdentifier=phosphor-fan-monitor
+
+[Install]
+RequiredBy=obmc-chassis-poweron@%i.target
diff --git a/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service b/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service
index 2392dcd..09f3494 100644
--- a/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service
+++ b/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service
@@ -1,15 +1,11 @@
[Unit]
Description=Phosphor Fan Monitor Daemon
-Wants=phosphor-fan-control@%i.service
-Before=phosphor-fan-control@%i.service
Conflicts=obmc-chassis-poweroff@%i.target
[Service]
Restart=on-failure
-ExecStart=/usr/bin/env phosphor-fan-monitor
+ExecStart=/usr/bin/env phosphor-fan-monitor --monitor
SyslogIdentifier=phosphor-fan-monitor
-Type=notify
-NotifyAccess=all
[Install]
RequiredBy=obmc-fan-control-ready@%i.target