meta-hpe: dl360-g11 power sequencing
Signed-off-by: Andrew Neyland <andrew.neyland@hpe.com>
Change-Id: I991a2519850214a547b8129281d043a5f8af9d9e
diff --git a/meta-hpe/meta-dl360-g11/recipes-hpe/power-sequencing/files/power-button.sh b/meta-hpe/meta-dl360-g11/recipes-hpe/power-sequencing/files/power-button.sh
new file mode 100644
index 0000000..e25ae66
--- /dev/null
+++ b/meta-hpe/meta-dl360-g11/recipes-hpe/power-sequencing/files/power-button.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# File which is managing GPIOS when detected. First parameter is which GPIOs that switched
+if [ "$1" = "pressed" ]
+then
+ busctl set-property xyz.openbmc_project.Chassis.Gpios /xyz/openbmc_project/chassis/gpios xyz.openbmc_project.Chassis.Gpios PButton b true
+else
+ if [ "$1" = "released" ]
+ then
+ busctl set-property xyz.openbmc_project.Chassis.Gpios /xyz/openbmc_project/chassis/gpios xyz.openbmc_project.Chassis.Gpios PButton b false
+ fi
+fi
+echo "$1" >> /tmp/buttons.txt