2012-12-15 02:01:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-10-04 18:30:34 +00:00
|
|
|
lantiq_get_dt_led() {
|
2016-01-01 21:18:21 +00:00
|
|
|
local label
|
2016-10-04 18:30:34 +00:00
|
|
|
local ledpath
|
2017-05-26 13:13:42 +00:00
|
|
|
local basepath="/proc/device-tree"
|
2016-10-04 18:34:03 +00:00
|
|
|
local nodepath="$basepath/aliases/led-$1"
|
2016-01-01 21:18:21 +00:00
|
|
|
|
2016-10-04 18:30:34 +00: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 21:04:12 +00:00
|
|
|
|
|
|
|
lantiq_is_vdsl_system() {
|
|
|
|
grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
|
|
|
|
}
|