From f69991acb0e59ffb74144af8483699e6e01dc64d Mon Sep 17 00:00:00 2001 From: Bastien Dejean Date: Tue, 7 May 2024 09:47:20 +0200 Subject: [PATCH] Fix the standard LED's interface path --- contrib/plato.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/contrib/plato.sh b/contrib/plato.sh index aa74b85d..b2ff5132 100755 --- a/contrib/plato.sh +++ b/contrib/plato.sh @@ -15,13 +15,21 @@ sync killall -TERM nickel hindenburg sickel fickel adobehost foxitpdf iink dhcpcd-dbus dhcpcd fmon > /dev/null 2>&1 -STANDARD_LEDS=0 -LEDS_INTERFACE=/sys/devices/platform/pmic_light.1/lit -if [ -e /sys/class/leds/bd71828-green-led ] ; then +if [ -e /sys/class/leds/LED ] ; then + LEDS_INTERFACE=/sys/class/leds/LED/brightness + STANDARD_LEDS=1 +elif [ -e /sys/class/leds/GLED ] ; then + LEDS_INTERFACE=/sys/class/leds/GLED/brightness + STANDARD_LEDS=1 +elif [ -e /sys/class/leds/bd71828-green-led ] ; then + LEDS_INTERFACE=/sys/class/leds/bd71828-green-led/brightness STANDARD_LEDS=1 - LEDS_INTERFACE=/sys/class/leds/bd71828-green-led elif [ -e /sys/devices/platform/ntx_led/lit ] ; then LEDS_INTERFACE=/sys/devices/platform/ntx_led/lit + STANDARD_LEDS=0 +elif [ -e /sys/devices/platform/pmic_light.1/lit ] ; then + LEDS_INTERFACE=/sys/devices/platform/pmic_light.1/lit + STANDARD_LEDS=0 fi # Turn off the LEDs