blob: e25ae66d7b3e6bef583db2cd2b66a62f3a124238 [file] [log] [blame]
Andrew Neylandcf8f7462023-09-06 14:42:07 -05001#!/bin/sh
2# File which is managing GPIOS when detected. First parameter is which GPIOs that switched
3if [ "$1" = "pressed" ]
4then
5 busctl set-property xyz.openbmc_project.Chassis.Gpios /xyz/openbmc_project/chassis/gpios xyz.openbmc_project.Chassis.Gpios PButton b true
6else
7 if [ "$1" = "released" ]
8 then
9 busctl set-property xyz.openbmc_project.Chassis.Gpios /xyz/openbmc_project/chassis/gpios xyz.openbmc_project.Chassis.Gpios PButton b false
10 fi
11fi
12echo "$1" >> /tmp/buttons.txt