diff options
Diffstat (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/gpio/id-button/toggle_identify_led.sh')
-rw-r--r-- | meta-ibm/meta-witherspoon/recipes-phosphor/gpio/id-button/toggle_identify_led.sh | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/id-button/toggle_identify_led.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/id-button/toggle_identify_led.sh deleted file mode 100644 index 496ece2b2..000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/id-button/toggle_identify_led.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# Toggle the state of identify LED Group - -SERVICE="xyz.openbmc_project.LED.GroupManager" -INTERFACE="xyz.openbmc_project.Led.Group" -PROPERTY="Asserted" - -# Get current state -object=$(busctl tree $SERVICE --list | grep identify) -led=$(cat /sys/devices/platform/leds/leds/front-id/brightness) -if [ "$led" == "0" ]; then - busctl set-property $SERVICE $object $INTERFACE $PROPERTY b false -else - busctl set-property $SERVICE $object $INTERFACE $PROPERTY b true -fi - -state=$(busctl get-property $SERVICE $object $INTERFACE $PROPERTY \ - | awk '{print $NF;}') - -if [ "$state" == "false" ]; then - target='true' -else - target='false' -fi - -# Set target state -busctl set-property $SERVICE $object $INTERFACE $PROPERTY b $target |