aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-12-11 15:06:11 +0000
committerJohn Crispin <john@openwrt.org>2015-12-11 15:06:11 +0000
commitec6b85ca0eb5594718a994b5b6981a4f0336da4d (patch)
tree527a8a020590fab6e69b9e087629b61acf8143c4 /package/base-files
parent354aa80ada3ac1c39e3d752ecad9f90e4b80934b (diff)
downloadupstream-ec6b85ca0eb5594718a994b5b6981a4f0336da4d.tar.gz
upstream-ec6b85ca0eb5594718a994b5b6981a4f0336da4d.tar.bz2
upstream-ec6b85ca0eb5594718a994b5b6981a4f0336da4d.zip
base-files: use max_brightness to set LED
LEDs which are controlled by a PWM need to use the supplied max_brightness instead. Otherwise they might appear to be very dim / broken. Signed-off-by: Chris R Blake <chrisrblake93@gmail.com> SVN-Revision: 47854
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index 3f45732499..84cd028bd8 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -44,7 +44,7 @@ load_led() {
ret="$?"
[ $default = 1 ] &&
- echo 1 >/sys/class/leds/${sysfs}/brightness
+ cat /sys/class/leds/${sysfs}/max_brightness > /sys/class/leds/${sysfs}/brightness
[ $ret = 0 ] || {
echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"