Andrew Neyland | cf8f746 | 2023-09-06 14:42:07 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # File which is managing GPIOS when detected. First parameter is which GPIOs that switched |
| 3 | if [ "$1" = "pressed" ] |
| 4 | then |
| 5 | busctl set-property xyz.openbmc_project.Chassis.Gpios /xyz/openbmc_project/chassis/gpios xyz.openbmc_project.Chassis.Gpios PButton b true |
| 6 | else |
| 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 |
| 11 | fi |
| 12 | echo "$1" >> /tmp/buttons.txt |