mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-02 12:22:29 +00:00
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: aa3b6a08c5
("kernel: Replace ledtrig-netdev with upstream backport")
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
3262fce1cd
commit
201058b35c
@ -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
|
||||
}
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user