Ensure host-shutdown target calls the host-stop target

As a part of the soft power off (host-shutdown) ensure
that the host-stop target always gets called.  Updated the
involved services to ensure they are run in the correct order.

Change-Id: I7e9113631786f0d0cb0f89b94c4b97fdc0328e7b
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
index 2f06dde..0f5e015 100644
--- a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
@@ -79,6 +79,13 @@
 FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}"
 SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
 
+# Force the shutdown target to run the host-stop target
+HOST_STOP_TMPL = "obmc-host-stop@.target"
+HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target"
+HOST_STOP_INSTFMT = "obmc-host-stop@{0}.target"
+HOST_STOP_FMT = "../${HOST_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${HOST_STOP_INSTFMT}"
+SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+
 SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
 SRCREV = "48696ce1a4a5b894382f0c9336a93d43f23b5fb1"