fixes broken if-then in led init script
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 27 Aug 2008 20:33:13 +0000 (20:33 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 27 Aug 2008 20:33:13 +0000 (20:33 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12411 3c298f89-4303-0410-b956-a3cf2f4a3e73

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
This page took 0.024455 seconds and 4 git commands to generate.