lantiq: remove lantiq_board_name, use the generic function instead
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / functions / lantiq.sh
1 #!/bin/sh
2
3 lantiq_board_model() {
4 local model
5
6 [ -f /tmp/sysinfo/model ] && model=$(cat /tmp/sysinfo/model)
7 [ -z "$model" ] && model="unknown"
8
9 echo "$model"
10 }
11
12 lantiq_get_dt_led() {
13 local label
14 local ledpath
15 local basepath="/sys/firmware/devicetree/base"
16 local nodepath="$basepath/aliases/led-$1"
17
18 [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
19 [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")
20
21 echo "$label"
22 }
23
24 lantiq_is_vdsl_system() {
25 grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
26 }