fixes broken if-then in led init script
authorJohn Crispin <john@openwrt.org>
Wed, 27 Aug 2008 20:33:13 +0000 (20:33 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 27 Aug 2008 20:33:13 +0000 (20:33 +0000)
SVN-Revision: 12411

package/base-files/files/etc/init.d/led

index cf7bf4203ded5fc8d75fda92aba66f64547bb3cd..1f05d724a2e6edb486ae05a25b0fddc4cf0e9662 100755 (executable)
@@ -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