diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-01-04 20:11:50 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2017-01-19 01:28:03 +0300 |
commit | 41e3cb3e2894b622dc27fcbb7391c10d7a488bed (patch) | |
tree | fd3b9530edacf9d45e86c4c6bfae2443d9098b6e /meta-phosphor/common/recipes-phosphor/host-ipmid | |
parent | c91cfcb7b1749ca2892124fc733989dbfbf159f4 (diff) | |
download | openbmc-41e3cb3e2894b622dc27fcbb7391c10d7a488bed.tar.xz |
Recipe and service to issue the host soft power off
Change-Id: I2536c07a30b5b26f04719474e4f3a87e2fd63903
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/host-ipmid')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb | 11 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/op-stop-host@.service | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb index 29f54a0e5f..8b986e6bce 100644 --- a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb +++ b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid.bb @@ -27,3 +27,14 @@ FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}" FILES_${PN}-dev_append = " ${libdir}/host-ipmid/lib*${SOLIBSDEV} ${libdir}/host-ipmid/*.la" DBUS_SERVICE_${PN} += "org.openbmc.HostServices.service" + +# Soft Power Off +RDEPENDS_${PN} += "phosphor-mapper" + +TMPL = "op-stop-host@.service" +INSTFMT = "op-stop-host@{0}.service" +TGTFMT = "obmc-stop-host@{0}.target" +FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}" + +SYSTEMD_SERVICE_${PN} += "${TMPL}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/op-stop-host@.service b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/op-stop-host@.service new file mode 100644 index 0000000000..83c16bb270 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/host-ipmid/host-ipmid/op-stop-host@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Soft power off of the host + +[Service] +Restart=no +Type=oneshot +RemainAfterExit=yes +ExecStart={sbindir}/mapper call /org/openbmc/HostServices org.openbmc.HostServices SoftPowerOff +Conflicts=obmc-chassis-start@%i.target + +[Install] +WantedBy=obmc-stop-host@%i.target |