[OpenWrt-Devel] [PATCH] base-files: Fix netdev led trigger

Hauke Mehrtens hauke at hauke-m.de
Sun Dec 16 10:56:09 EST 2018


In the upstream netdev led trigger the one mode file was replaced by 3
files named rx, tx and link. Fix the netdev trigger configuration code
to use the modified API.

Fixes: aa3b6a08c56 ("kernel: Replace ledtrig-netdev with upstream backport")
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/base-files/files/etc/init.d/led | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index a3f1224a1a..570b53df11 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -71,7 +71,7 @@ load_led() {
 		"netdev")
 			[ -n "$dev" ] && {
 				echo $dev > /sys/class/leds/${sysfs}/device_name
-				echo "${mode:-link}" > /sys/class/leds/${sysfs}/mode
+				echo 1 > /sys/class/leds/${sysfs}/${mode:-link}
 				echo $interval > /sys/class/leds/${sysfs}/interval
 			}
 			;;
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list