phal: Added proc-pre-poweroff support
Changes:
-Adding new service which will be called during
chassis poweroff.
Test:
-Did poweroff to check, if the service file
is getting picked up or not and new added
procedure is getting called.
Signed-off-by: Chirag Sharma <chirshar@in.ibm.com>
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
Change-Id: Ic533433c4771216e5681b61cccf154f7ed029457
diff --git a/proc-pre-poweroff@.service.in b/proc-pre-poweroff@.service.in
new file mode 100644
index 0000000..c665841
--- /dev/null
+++ b/proc-pre-poweroff@.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=Preparation to poweroff host%i
+Wants=op-cfam-reset.service
+Before=op-cfam-reset.service
+Wants=obmc-power-stop-pre@%i.target
+Before=obmc-power-stop-pre@%i.target
+Conflicts=obmc-chassis-poweron@%i.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/openpower-proc-control prePoweroff
+
+[Install]
+WantedBy=obmc-power-stop-pre@%i.target