Commit 12a5f91d authored by blogic's avatar blogic
Browse files

base-files: fix led script to skip missing triggers

this is based on http://patchwork.ozlabs.org/patch/424451/

Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44087 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent bfb21d0f
......@@ -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" ] && {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment