bmc-reset: call new host reset check service

This service will only run in the following condition:
- Chassis power is on when the BMC comes out of reset
- Host state management is unable to communicate with the host over IPMI
  or PLDM channels

Tested:
- Verified service does not run if chassis power is not on when coming
  to BMC Ready (i..e /run/openbmc/chassis@0-on present)
- Verified service does not run if host has responded over PLDM or IPMI
  (i.e. /run/openbmc/host@0-on present)
- Verified if we get past the above checks, the hw procedure is called
  as expected

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I761c7333949f9c0e1e7505b686afc4ca537346fd
diff --git a/service_files/op-reset-host-check@.service.in b/service_files/op-reset-host-check@.service.in
new file mode 100644
index 0000000..9f5d1a6
--- /dev/null
+++ b/service_files/op-reset-host-check@.service.in
@@ -0,0 +1,18 @@
+[Unit]
+Description=Check Host%i status on BMC reset via CFAM reg
+After=phosphor-reset-host-check@%i.service
+Wants=obmc-host-reset-running@%i.target
+Before=obmc-host-reset-running@%i.target
+Wants=op-reset-chassis-on@%i.service
+After=op-reset-chassis-on@%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=/run/openbmc/chassis@%i-on
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/usr/bin/openpower-proc-control checkHostRunning
+
+[Install]
+WantedBy=obmc-host-reset@%i.target