Recipe for phosphor-discover-system-state

This recipe will add the new program phosphor-discover-system-state
to new builds. Additionally, the old Python state manager is
removed from the build since discover_system_state.py was the last
thing in it.

Resolves openbmc/openbmc#773

Change-Id: I99ba0f1f0264cedebc5a9a7e5fa5dbaba0b79502
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
diff --git a/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service b/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service
new file mode 100644
index 0000000..325e8dc
--- /dev/null
+++ b/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Reboot If Enabled
+Wants=mapper-wait@-org-openbmc-settings-host%i.service
+After=mapper-wait@-org-openbmc-settings-host%i.service
+Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
+After=mapper-wait@-xyz-openbmc_project-state-host%i.service
+Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart={sbindir}/phosphor-discover-system-state --host %i
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}