summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service')
-rw-r--r--meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
new file mode 100644
index 000000000..11373618b
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Wait for Power%i to turn off
+Before=obmc-power-off@%i.target
+Wants=obmc-power-stop@%i.target
+Before=obmc-power-stop@%i.target
+Wants=obmc-power-stop-pre@%i.target
+After=obmc-power-stop-pre@%i.target
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Conflicts=obmc-chassis-poweron@%i.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env pgood_wait /org/openbmc/control/power%i off
+SyslogIdentifier=pgood_wait
+ExecStart=/bin/rm -f /run/openbmc/chassis@%i-on
+ExecStart=/bin/rm -f /run/openbmc/host@%i-on
+ExecStart=/bin/rm -f /run/openbmc/host@%i-request
+
+[Install]
+WantedBy=obmc-host-stop@%i.target
OpenPOWER on IntegriCloud