openwrtv3/target/linux/ramips/base-files/lib/ramips.sh
Gabor Juhos 09aec474af ramips: add diag support
SVN-Revision: 20799
2010-04-11 17:47:23 +00:00

31 lines
409 B
Bash
Executable file

#!/bin/sh
#
# Copyright (C) 2010 OpenWrt.org
#
ramips_board_name() {
local machine
local name
machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
case "$machine" in
*"DIR-300 revB")
name="dir-300-b1"
;;
*"La Fonera 2.0N")
name="fonera20n"
;;
*"V22RW-2X2")
name="v22rw-2x2"
;;
*"WHR-G300N")
name="whr-g300n"
;;
*)
name="generic"
;;
esac
echo $name
}