aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/init.d
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-02-25 13:31:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-02-25 13:31:29 +0000
commit285d9e364e6df1b1209077b4730a2e268d813f00 (patch)
tree15e88b6da3245dbf9cbde7845e46af02fdb3fd8d /package/base-files/files/etc/init.d
parentd527b828624c6b86813f68d1ffa3bb8c84249f65 (diff)
downloadupstream-285d9e364e6df1b1209077b4730a2e268d813f00.tar.gz
upstream-285d9e364e6df1b1209077b4730a2e268d813f00.tar.bz2
upstream-285d9e364e6df1b1209077b4730a2e268d813f00.zip
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 <michal.cieslakiewicz@wp.pl> SVN-Revision: 48776
Diffstat (limited to 'package/base-files/files/etc/init.d')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led5
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 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
}