diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-16 16:51:26 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-16 20:11:44 +0100 |
commit | 201058b35ce42086b83f7eabb6304cac00c4c585 (patch) | |
tree | cdf1b2261061f1776bada5edfaa4e6ae75fcd4ab /package/base-files/files/etc | |
parent | 3262fce1cd12cd9dbd3b3e50d034233b2b884101 (diff) | |
download | upstream-201058b35ce42086b83f7eabb6304cac00c4c585.tar.gz upstream-201058b35ce42086b83f7eabb6304cac00c4c585.tar.bz2 upstream-201058b35ce42086b83f7eabb6304cac00c4c585.zip |
base-files: Fix netdev led trigger
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")
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-x | package/base-files/files/etc/init.d/led | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index a3f1224a1a..932a69a82b 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -71,7 +71,10 @@ load_led() { "netdev") [ -n "$dev" ] && { echo $dev > /sys/class/leds/${sysfs}/device_name - echo "${mode:-link}" > /sys/class/leds/${sysfs}/mode + for m in $mode; do + [ -e "/sys/class/leds/${sysfs}/$m" ] && \ + echo 1 > /sys/class/leds/${sysfs}/$m + done echo $interval > /sys/class/leds/${sysfs}/interval } ;; |