diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/fans')
3 files changed, 14 insertions, 28 deletions
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service b/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service deleted file mode 100644 index e8a6f699a..000000000 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Phosphor Fan Monitor Initialization -Wants=obmc-power-on@%i.target -After=obmc-power-on@%i.target -Conflicts=obmc-chassis-powered-off@%i.target - -[Service] -Restart=on-failure -ExecStart=/usr/bin/env phosphor-fan-monitor --init -SyslogIdentifier=phosphor-fan-monitor - -[Install] -WantedBy=obmc-chassis-poweron@%i.target diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service b/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service deleted file mode 100644 index ddecfba3c..000000000 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Phosphor Fan Monitor Daemon -Conflicts=obmc-chassis-powered-off@%i.target - -[Service] -Restart=on-failure -ExecStart=/usr/bin/env phosphor-fan-monitor --monitor -SyslogIdentifier=phosphor-fan-monitor - -[Install] -RequiredBy=obmc-fan-control-ready@%i.target diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb index e1eb2caca..e13434eef 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb @@ -105,16 +105,26 @@ PACKAGECONFIG[monitor] = "--enable-monitor \ TMPL_MONITOR = "phosphor-fan-monitor@.service" INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" -FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" +FMT_MONITOR_FANSREADY = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" +FMT_MONITOR_PWRON = "../${TMPL_MONITOR}:${POWERON_TGT}.requires/${INSTFMT_MONITOR}" +FMT_MONITOR_MUSR = "../${TMPL_MONITOR}:${MULTI_USR_TGT}.wants/${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}.wants/${INSTFMT_MONITOR_INIT}" FILES_${PN}-monitor = "${bindir}/phosphor-fan-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')}" +SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}" +SYSTEMD_SERVICE_${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_MONITOR_INIT}', d)}" + +# JSON: power on and multi-user links. YAML: fans-ready and fan monitor init links +SYSTEMD_LINK_${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \ + compose_list(d, 'FMT_MONITOR_PWRON', 'OBMC_CHASSIS_INSTANCES'), \ + compose_list(d, 'FMT_MONITOR_FANSREADY', 'OBMC_CHASSIS_INSTANCES'), d)}" + +SYSTEMD_LINK_${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \ + compose_list(d, 'FMT_MONITOR_MUSR', 'OBMC_CHASSIS_INSTANCES'), \ + compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}" # -------------------------------------- # phosphor-cooling-type specific configuration |