aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/led6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index d2310f019d..6962bfa843 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -40,7 +40,11 @@ load_led() {
[ $default -eq 1 ] ||
echo 0 >/sys/class/leds/${sysfs}/brightness
}
- echo $trigger > /sys/class/leds/${sysfs}/trigger
+ echo $trigger > /sys/class/leds/${sysfs}/trigger 2> /dev/null
+ [ $? = 0 ] || {
+ echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"
+ return 1
+ }
case "$trigger" in
"netdev")
[ -n "$dev" ] && {