IPMI: Provide recipe file for soft power off service
Change-Id: I9d17bb3b90dee86e2290b8552bb519b0164c477c
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index 90b03ed..5137a3c 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -28,6 +28,8 @@
RDEPENDS_${PN} += "phosphor-time-manager"
RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces"
+SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service phosphor-ipmi-host.service"
+
RRECOMMENDS_${PN} += "virtual-obmc-settings-mgmt"
SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid"
@@ -46,7 +48,6 @@
S = "${WORKDIR}/git"
HOSTIPMI_PROVIDER_LIBRARY += "libapphandler.so"
-HOSTIPMI_PROVIDER_LIBRARY += "libhostservice.so"
HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so"
NETIPMI_PROVIDER_LIBRARY += "libapphandler.so"
@@ -56,15 +57,5 @@
FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.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/common/recipes-phosphor/ipmi/phosphor-ipmi-host/op-stop-host@.service b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/op-stop-host@.service
deleted file mode 100644
index 64ec0fb..0000000
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/op-stop-host@.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Soft power off of the host
-Conflicts=obmc-chassis-start@%i.target
-
-[Service]
-Restart=no
-Type=oneshot
-RemainAfterExit=yes
-ExecStart={sbindir}/mapper call /org/openbmc/HostServices org.openbmc.HostServices SoftPowerOff
-
-[Install]
-WantedBy=obmc-stop-host@%i.target
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/org.openbmc.HostServices.service b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
similarity index 91%
rename from common/recipes-phosphor/ipmi/phosphor-ipmi-host/org.openbmc.HostServices.service
rename to common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
index f2bdb8c..febbe87 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/org.openbmc.HostServices.service
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
@@ -8,8 +8,6 @@
[Service]
Restart=always
ExecStart={sbindir}/ipmid
-Type=dbus
-BusName={BUSNAME}
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
new file mode 100644
index 0000000..aaba630
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Soft power off of the host
+Wants=mapper-wait@-org-openbmc-HostIpmi-1.service
+After=mapper-wait@-org-openbmc-HostIpmi-1.service
+
+[Service]
+Restart=no
+ExecStart={sbindir}/phosphor-softpoweroff
+Type=oneshot