[openwrt/openwrt] bcm53xx: fix fallback code for picking status LED

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 27 08:01:59 PST 2018

rmilecki pushed a commit to openwrt/openwrt.git, branch lede-17.01:

commit 7dcbe0e22dbb8c1e67a4c177247e774c67a27b2c
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Tue Feb 27 16:49:31 2018 +0100

    bcm53xx: fix fallback code for picking status LED
    Looking for a wrong LED file name was stopping this code from find any
    LED. This affects devices with only a red/amber power LED.
    Fixes: 3aaee1ba023ac ("bcm53xx: failsafe support")
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
 target/linux/bcm53xx/base-files/etc/diag.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/bcm53xx/base-files/etc/diag.sh b/target/linux/bcm53xx/base-files/etc/diag.sh
index a8a560c..1a93323 100644
--- a/target/linux/bcm53xx/base-files/etc/diag.sh
+++ b/target/linux/bcm53xx/base-files/etc/diag.sh
@@ -13,7 +13,7 @@ get_status_led() {
 	# Now just pick any power LED
-	status_led_file=$(find /sys/class/leds/ -name "*:power:*" | head -n1)
+	status_led_file=$(find /sys/class/leds/ -name "*:power" | head -n1)
 	if [ -d "$status_led_file" ]; then
 		status_led=$(basename $status_led_file)

More information about the lede-commits mailing list