Provide the quanta host power control.
systemctl start obmc-chassis-poweroff@0.target
systemctl start obmc-chassis-poweron@0.target
Added the host-gpio.service on boot to enable the power on
and power off scripts.
Testing: The scripts were launched with the state change commands above,
however they were modified such that they didn't rely on the old
namespace.
The GPIOs basically trigger the power button on the front panel.
Change-Id: I4a205e60c8f43f626f3ea0d4fedf182ccf4700ba
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/meta-q71l/recipes-phosphor/quanta-powerctrl/files/host-poweroff.service b/meta-q71l/recipes-phosphor/quanta-powerctrl/files/host-poweroff.service
new file mode 100644
index 0000000..d8159a1
--- /dev/null
+++ b/meta-q71l/recipes-phosphor/quanta-powerctrl/files/host-poweroff.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Stop Host
+Requires=host-gpio.service
+After=host-gpio.service
+Conflicts=obmc-chassis-power-on@0.target
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart={sbindir}/poweroff.sh
+
+[Install]
+WantedBy=obmc-chassis-power-off@0.target