Targets and services to check for pgood on bmc reset
Once enabled these targets and services will be run after
a BMC reboot to check if pgood is on and if so, to create
a file which will be used by other power on services
to know whether they need to run or not.
Change-Id: Id2e75f9bce20f362d2f57a79e91ece1eaf7d7c45
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target b/common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target
new file mode 100644
index 0000000..1741d41
--- /dev/null
+++ b/common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=Chassis%i (Reset Check)
+Conflicts=obmc-power-chassis-off%i.target
+RefuseManualStop=yes
diff --git a/common/recipes-core/systemd/obmc-targets/obmc-power-chassis-off@.target b/common/recipes-core/systemd/obmc-targets/obmc-power-chassis-off@.target
index b3c8256..ceba1e3 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-power-chassis-off@.target
+++ b/common/recipes-core/systemd/obmc-targets/obmc-power-chassis-off@.target
@@ -5,4 +5,5 @@
Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
Conflicts=obmc-power-chassis-on@%i.target
+Conflicts=obmc-chassis-reset@%i.target
RefuseManualStop=yes
diff --git a/common/recipes-core/systemd/obmc-targets/obmc-power-reset-on@.target b/common/recipes-core/systemd/obmc-targets/obmc-power-reset-on@.target
new file mode 100644
index 0000000..5c8d3e6
--- /dev/null
+++ b/common/recipes-core/systemd/obmc-targets/obmc-power-reset-on@.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Chassis%i power on after reset
+Conflicts=obmc-power-chassis-off@%i.target
+RefuseManualStart=yes
+RefuseManualStop=yes