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

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 27 07:52:34 PST 2018


rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/86e5a6d985e1666e685b1cacb204039ddf03f4cb

commit 86e5a6d985e1666e685b1cacb204039ddf03f4cb
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() {
 	fi;
 
 	# 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)
 		return



More information about the lede-commits mailing list