summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-phosphor/fans
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-08-23 21:18:01 +0300
committerMatthew Barth <msbarth@us.ibm.com>2017-08-28 17:46:43 +0300
commitcac2ecf650a6b1b26e489e5c9d016b900d9dac0b (patch)
tree1c54b841ca55127c8891681371605fdad30a9a1e /meta-phosphor/common/recipes-phosphor/fans
parent8aa1141141f0b83a9b8aa4055c219ee83a0d0978 (diff)
downloadopenbmc-cac2ecf650a6b1b26e489e5c9d016b900d9dac0b.tar.xz
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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/fans')
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb7
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service13
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service6
3 files changed, 20 insertions, 6 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
index e70bd5baa9..79329b0df6 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 @@ TMPL_MONITOR = "phosphor-fan-monitor@.service"
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
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service
new file mode 100644
index 0000000000..a01acad4ce
--- /dev/null
+++ b/meta-phosphor/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/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service
index 2392dcd742..09f349411e 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service
+++ b/meta-phosphor/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