Opennet Firmware
 Alle Dateien Funktionen Variablen Gruppen Seiten
led_input_trigger_warnings.patch
gehe zur Dokumentation dieser Datei
1 Verify the support of the led trigger input source and complain in a helpful
2 way if modules are missing during bootup.
3 
4 Berichtet via openwrt-devel@lists.openwrt.org am 29.12.2014
5 --- a/openwrt/package/base-files/files/etc/init.d/led
6 +++ b/openwrt/package/base-files/files/etc/init.d/led
7 @@ -40,7 +40,11 @@ load_led() {
8  [ $default -eq 1 ] ||
9  echo 0 >/sys/class/leds/${sysfs}/brightness
10  }
11 - echo $trigger > /sys/class/leds/${sysfs}/trigger
12 + # this may fail if the module is not loaded
13 + if ! echo $trigger > /sys/class/leds/${sysfs}/trigger 2>/dev/null; then
14 + echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"
15 + return 0
16 + fi
17  case "$trigger" in
18  "netdev")
19  [ -n "$dev" ] && {