summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-05-11 16:16:27 -0500
committerAndrew Geissler <geissonator@yahoo.com>2017-05-19 17:55:09 +0000
commitecfa6624418b081f096db525e9ba82a135b79268 (patch)
tree905cc4c34fe51f43656d546559d7af9c5ce76514 /meta-phosphor/common
parent3e1b846ac49dea734df67fde77c58b0f399bd375 (diff)
downloadtalos-openbmc-ecfa6624418b081f096db525e9ba82a135b79268.tar.gz
talos-openbmc-ecfa6624418b081f096db525e9ba82a135b79268.zip
Put soft power off service in host shutdown target
This will ensure we give the host a chance to shutdown properly when a power off is requested Change-Id: I3e58a1ad6a187f63dc27448a1f6c2ac25d4a58e3 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common')
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index 9d23d1eb1..21b7af53c 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -11,6 +11,7 @@ inherit obmc-phosphor-sdbus-service
inherit obmc-phosphor-ipmiprovider-symlink
inherit phosphor-ipmi-host
inherit pythonnative
+inherit obmc-phosphor-systemd
DEPENDS += "phosphor-logging"
DEPENDS += "phosphor-mapper"
@@ -19,6 +20,7 @@ DEPENDS += "packagegroup-obmc-ipmid-providers"
DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
DEPENDS += "sdbusplus"
DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "obmc-targets"
RDEPENDS_${PN}-dev += "phosphor-logging"
RDEPENDS_${PN}-dev += "phosphor-mapper-dev"
@@ -59,3 +61,9 @@ FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/
# Soft Power Off
RDEPENDS_${PN} += "phosphor-mapper"
+
+# install the soft power off service in the host shutdown target
+SOFT_SVC = "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
+SOFT_TGTFMT = "obmc-host-shutdown@{0}.target"
+SOFT_FMT = "../${SOFT_SVC}:${SOFT_TGTFMT}.requires/${SOFT_SVC}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'SOFT_FMT', 'OBMC_HOST_INSTANCES')}"
OpenPOWER on IntegriCloud