aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2008-08-27 20:33:13 +0000
committerJohn Crispin <blogic@openwrt.org>2008-08-27 20:33:13 +0000
commit4c3d50f6f89fd24396eb8e1926314088da82ba10 (patch)
treebb90adf48db67f88ecde347d9f1759d11adaf311
parent533c261d295221197e78a4dfea0063ceb9a81f05 (diff)
downloadmaster-187ad058-4c3d50f6f89fd24396eb8e1926314088da82ba10.tar.gz
master-187ad058-4c3d50f6f89fd24396eb8e1926314088da82ba10.tar.bz2
master-187ad058-4c3d50f6f89fd24396eb8e1926314088da82ba10.zip
fixes broken if-then in led init script
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12411 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xpackage/base-files/files/etc/init.d/led5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index cf7bf4203d..1f05d724a2 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -26,8 +26,9 @@ load_led() {
logger "setting up led : $name"
[ -n "$default" ] && {
[ $default -eq 1 ] &&
- echo 1 >/sys/class/leds/${sysfs}/brightness \
- || echo 0 >/sys/class/leds/${sysfs}/brightness
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
}
[ -z "$trigger" ] && trigger=none
echo $trigger > /sys/class/leds/${sysfs}/trigger