aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2008-08-27 20:33:13 +0000
committerJohn Crispin <john@openwrt.org>2008-08-27 20:33:13 +0000
commit12df593510d877a11d0325c0a6dad2c697d5fc70 (patch)
treea932e61b4a11df4c65bfc46b080d5462cfc1e92a /package/base-files/files
parent0e00c749461c27fb1e849025a542d16f48528fe7 (diff)
downloadupstream-12df593510d877a11d0325c0a6dad2c697d5fc70.tar.gz
upstream-12df593510d877a11d0325c0a6dad2c697d5fc70.tar.bz2
upstream-12df593510d877a11d0325c0a6dad2c697d5fc70.zip
fixes broken if-then in led init script
SVN-Revision: 12411
Diffstat (limited to 'package/base-files/files')
-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