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