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/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
index e70bd5b..79329b0 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
@@ -103,9 +103,14 @@
 INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service"
 FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}"
 
+TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service"
+INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service"
+FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.requires/${INSTFMT_MONITOR_INIT}"
+
 FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor"
-SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}"
+SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR} ${TMPL_MONITOR_INIT}"
 SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES')}"
 
 # --------------------------------------
 # phosphor-cooling-type specific configuration