aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/etc/init.d')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index a3f1224a1a..932a69a82b 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -71,7 +71,10 @@ load_led() {
"netdev")
[ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name
- echo "${mode:-link}" > /sys/class/leds/${sysfs}/mode
+ for m in $mode; do
+ [ -e "/sys/class/leds/${sysfs}/$m" ] && \
+ echo 1 > /sys/class/leds/${sysfs}/$m
+ done
echo $interval > /sys/class/leds/${sysfs}/interval
}
;;