2012-12-15 02:01:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-10-04 20:30:34 +02:00
|
|
|
lantiq_get_dt_led() {
|
2016-01-01 21:18:21 +00:00
|
|
|
local label
|
2016-10-04 20:30:34 +02:00
|
|
|
local ledpath
|
2017-05-26 15:13:42 +02:00
|
|
|
local basepath="/proc/device-tree"
|
2016-10-04 20:34:03 +02:00
|
|
|
local nodepath="$basepath/aliases/led-$1"
|
2016-01-01 21:18:21 +00:00
|
|
|
|
2016-10-04 20:30:34 +02:00
|
|
|
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
|
|
|
|
[ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")
|
2016-01-01 21:18:21 +00:00
|
|
|
|
|
|
|
echo "$label"
|
|
|
|
}
|
2017-02-17 22:04:12 +01:00
|
|
|
|
|
|
|
lantiq_is_vdsl_system() {
|
|
|
|
grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
|
|
|
|
}
|