base-files: get_dt_led: don't warn about missing led

It's intentional that some boards within a target don't have all LEDs
which are tried to be setup in a common script. Don't show a warning in
such cases.

Fixes: 4f4fc993db ("base-files: add more name source to get_dt_led helper function")
Signed-off-by: Mathias Kresin <dev@kresin.me>
openwrt-18.06
Mathias Kresin 2018-04-04 08:38:24 +02:00
parent 0c26264dee
commit 3a4bf25fd6
1 changed files with 1 additions and 2 deletions

View File

@ -10,8 +10,7 @@ get_dt_led() {
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath") [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
[ -n "$ledpath" ] && \ [ -n "$ledpath" ] && \
label=$(cat "$basepath$ledpath/label" 2>/dev/null) || \ label=$(cat "$basepath$ledpath/label" 2>/dev/null) || \
label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null) || \ label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null)
echo "led label not found" 1>&2
echo "$label" echo "$label"
} }