aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index c790e3e181..a3f1224a1a 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -20,7 +20,7 @@ load_led() {
config_get trigger $1 trigger "none"
config_get dev $1 dev
config_get ports $1 port
- config_get mode $1 mode "link"
+ config_get mode $1 mode
config_get_bool default $1 default "nil"
config_get delayon $1 delayon
config_get delayoff $1 delayoff
@@ -71,7 +71,7 @@ load_led() {
"netdev")
[ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name
- echo $mode > /sys/class/leds/${sysfs}/mode
+ echo "${mode:-link}" > /sys/class/leds/${sysfs}/mode
echo $interval > /sys/class/leds/${sysfs}/interval
}
;;
@@ -110,6 +110,8 @@ load_led() {
config_get speed_mask $1 speed_mask
[ -n "$speed_mask" ] && \
echo $speed_mask > /sys/class/leds/${sysfs}/speed_mask
+ [ -n "$mode" ] && \
+ echo "$mode" > /sys/class/leds/${sysfs}/mode
;;
esac
}