d9758f50f6b9b984142e06685be98db4f787e2a3
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / functions / lantiq.sh
1 #!/bin/sh
2
3 lantiq_get_dt_led() {
4 local label
5 local ledpath
6 local basepath="/sys/firmware/devicetree/base"
7 local nodepath="$basepath/aliases/led-$1"
8
9 [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
10 [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")
11
12 echo "$label"
13 }
14
15 lantiq_is_vdsl_system() {
16 grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
17 }