summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2021-02-12 22:02:05 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-02-25 15:46:26 +0300
commitd793c994c8b704f43761d3cb717153d1f766fe4b (patch)
tree1b69aa63d28306b4f928ba60a1eaa22c48be14c4
parent7fc35dd2b34b65b619ec19de7e01d49412241e2b (diff)
downloadopenbmc-d793c994c8b704f43761d3cb717153d1f766fe4b.tar.xz
Get phosphor-fan-monitor service files from repo
The phosphor-fan-presence repo installs different fan monitor service files based on if it was configured in YAML vs JSON mode. Update the recipe to link them in appropriately based on the mode, which is a packageconfig. Delete the service files out of meta-phosphor as they they now come from the repo. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ie2b1bca8aca78b45f77acaff55721a0ff480400d
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service13
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service11
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb18
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