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 cf7bf42..1f05d72 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