lantiq: introduce lantiq_is_vdsl_system

Move the code to check if the current system is a system with vdsl
support to a dedicate function to make it reusable.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin 2017-02-17 22:04:12 +01:00
parent cfd16ecc48
commit 044a4eafd5
2 changed files with 5 additions and 1 deletions

View file

@ -168,7 +168,7 @@ if [ -n "$(ls /lib/modules/`uname -r`/ltq_atm*)" ]; then
ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload"
fi
if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
if lantiq_is_vdsl_system; then
interface_wan="ptm0"
ucidef_add_vdsl_modem "$annex" "av" "ptm"
else

View file

@ -39,3 +39,7 @@ lantiq_get_dt_led() {
echo "$label"
}
lantiq_is_vdsl_system() {
grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
}