hardware: Update get_model to use the ar71xx board detect routines

Returns the same data for devices as CPUInfo would of returned for previous devices and for new devices like the CPE510 causes the system to list the exact model instead of of the family.
This commit is contained in:
Conrad Lara - KG6JEI 2015-04-05 21:58:03 -07:00
parent 31bd519266
commit 08600fd4e8
1 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,11 @@
#!/bin/sh
#CMLARA: Temporary shell script for ar71xx platform models
# Just resport what is on the /proc/cpuinfo field --- this will work for most ar71xx devices
# This doesn't work for linksys however since they have multiple devices
#Eventually we will want to to clean this up to a diffrent method
# Return the model of the device
echo `awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo`;
if [ ! -f /tmp/sysinfo/model ]; then
. /lib/functions.sh
. /lib/ar71xx.sh
ar71xx_board_detect
fi
cat /tmp/sysinfo/model