summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb')
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb
index 9d08084d4..075e06c3c 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb
@@ -15,10 +15,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
inherit cmake pkgconfig systemd
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.State.Boot.PostCode.service"
+
+def get_service(d):
+ if(d.getVar('OBMC_HOST_INSTANCES') == '0'):
+ return "xyz.openbmc_project.State.Boot.PostCode.service"
+ else:
+ return " ".join(["xyz.openbmc_project.State.Boot.PostCode@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()])
+
+SYSTEMD_SERVICE_${PN} = "${@get_service(d)}"
DEPENDS += " \
sdbusplus \
phosphor-dbus-interfaces \
phosphor-logging \
"
+
+FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode@.service"
+FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode.service"