From 285d9e364e6df1b1209077b4730a2e268d813f00 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 25 Feb 2016 13:31:29 +0000 Subject: base-files: add support for speed mask to switch config init scripts This patch adds extra parameter to switch LED trigger initialization functions. New functionality maintains backward compatibility, so calling functions without setting new speed_mask parameter works as expected. Signed-off-by: Michal Cieslakiewicz SVN-Revision: 48776 --- package/base-files/files/etc/init.d/led | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'package/base-files/files/etc/init.d/led') diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 84cd028bd8..d1521a9a61 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -88,11 +88,14 @@ load_led() { ;; switch[0-9]*) - local port_mask + local port_mask speed_mask config_get port_mask $1 port_mask [ -n "$port_mask" ] && \ echo $port_mask > /sys/class/leds/${sysfs}/port_mask + config_get speed_mask $1 speed_mask + [ -n "$speed_mask" ] && \ + echo $speed_mask > /sys/class/leds/${sysfs}/speed_mask ;; esac } -- cgit v1.2.3