summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend5
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service13
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb10
3 files changed, 12 insertions, 16 deletions
diff --git a/meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend
index 2b6da5946..09d4fd601 100644
--- a/meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend
+++ b/meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend
@@ -56,11 +56,12 @@ FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${IN
SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}"
# Enable the use of JSON on the fan applications that support it
-EXTRA_OECONF_append_witherspoon = " --enable-json --disable-json-control"
+PACKAGECONFIG_append_witherspoon = " json"
+EXTRA_OECONF_append_witherspoon = " --disable-json-control"
RDEPENDS_${PN}-presence-tach_append_witherspoon = " phosphor-fan-presence-config"
RDEPENDS_${PN}-monitor_append_witherspoon = " phosphor-fan-monitor-config"
-EXTRA_OECONF_append_rainier = " --enable-json"
+PACKAGECONFIG_append_rainier = " json"
RDEPENDS_${PN}-presence-tach_append_rainier = " phosphor-fan-presence-config"
RDEPENDS_${PN}-monitor_append_rainier = " phosphor-fan-monitor-config"
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service b/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
deleted file mode 100644
index a324740c5..000000000
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Phosphor Fan Presence Tach Daemon
-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-presence-tach
-SyslogIdentifier=phosphor-fan-presence-tach
-
-[Install]
-RequiredBy=obmc-chassis-poweron@%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 02eee307d..adad34900 100644
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb
+++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb
@@ -36,6 +36,9 @@ PACKAGE_BEFORE_PN += "${FAN_PACKAGES}"
PACKAGECONFIG ?= "presence control monitor"
SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
+# The control, monitor, and presence apps can either be JSON or YAML driven.
+PACKAGECONFIG[json] = "--enable-json, --disable-json"
+
# --------------------------------------
# ${PN}-presence-tach specific configuration
PACKAGECONFIG[presence] = " \
@@ -46,16 +49,21 @@ PACKAGECONFIG[presence] = " \
, \
"
-# Needed to install into the obmc-chassis-poweron target
+MULTI_USR_TGT = "multi-user.target"
TMPL_TACH = "phosphor-fan-presence-tach@.service"
INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service"
POWERON_TGT = "obmc-chassis-poweron@{0}.target"
FMT_TACH = "../${TMPL_TACH}:${POWERON_TGT}.requires/${INSTFMT_TACH}"
+FMT_TACH_MUSR = "../${TMPL_TACH}:${MULTI_USR_TGT}.wants/${INSTFMT_TACH}"
FILES_${PN}-presence-tach = "${bindir}/phosphor-fan-presence-tach"
SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}"
SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}"
+# JSON mode also gets linked into multi-user
+SYSTEMD_LINK_${PN}-presence-tach += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_TACH_MUSR', 'OBMC_CHASSIS_INSTANCES'), '', d)}"
+
# --------------------------------------
# ${PN}-control specific configuration
PACKAGECONFIG[control] = "--enable-control \