8c2e0ce5c1793155c4c8569603ce1de0a47462d6
[openwrt/staging/chunkeey.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="/proc/device-tree"
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 }