From: John Crispin Date: Fri, 11 Dec 2015 15:06:11 +0000 (+0000) Subject: base-files: use max_brightness to set LED X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ec6b85ca0eb5594718a994b5b6981a4f0336da4d;p=openwrt%2Fstaging%2Fkaloz.git 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 SVN-Revision: 47854 --- 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"