lantiq/led_dsl: Fix netdev led trigger
authorMartin Schiller <ms@dev.tdt.de>
Thu, 10 Jan 2019 07:59:31 +0000 (08:59 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jan 2019 00:04:53 +0000 (01:04 +0100)
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.

This fix is based on 201058b35ce ("base-files: Fix netdev led trigger")

Fixes: aa3b6a08c56 ("kernel: Replace ledtrig-netdev with upstream backport")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
target/linux/lantiq/base-files/etc/hotplug.d/dsl/led_dsl.sh

index 0bf749c56d0fdf3d8e0269c52c9a86de806a6597..dd8e84a1af4267e8c9863e01f4407008281ca401 100755 (executable)
@@ -10,7 +10,9 @@ led_dsl_up() {
        "netdev")
                led_set_attr $1 "trigger" "netdev"
                led_set_attr $1 "device_name" "$(config_get led_dsl dev)"
-               led_set_attr $1 "mode" "$(config_get led_dsl mode)"
+               for m in $(config_get led_dsl mode); do
+                       led_set_attr $1 "$m" "1"
+               done
                ;;
        *)
                led_on $1