mirror of https://github.com/hak5/openwrt-owl.git
base-files: fix led script to skip missing triggers
this is based on http://patchwork.ozlabs.org/patch/424451/ Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 44087owl
parent
255a680a99
commit
b54f3ad6e7
|
@ -40,7 +40,11 @@ load_led() {
|
||||||
[ $default -eq 1 ] ||
|
[ $default -eq 1 ] ||
|
||||||
echo 0 >/sys/class/leds/${sysfs}/brightness
|
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
|
case "$trigger" in
|
||||||
"netdev")
|
"netdev")
|
||||||
[ -n "$dev" ] && {
|
[ -n "$dev" ] && {
|
||||||
|
|
Loading…
Reference in New Issue