ar71xx: create WRT160NL network config from uci-defaults
[openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2009 OpenWrt.org
4 #
5
6 ar71xx_board_name() {
7 local machine
8 local name
9
10 machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
11
12 case "$machine" in
13 *ALL0258N)
14 name="all0258n"
15 ;;
16 *AP121)
17 name="ap121"
18 ;;
19 *AP121-MINI)
20 name="ap121-mini"
21 ;;
22 *AP81)
23 name="ap81"
24 ;;
25 *AP83)
26 name="ap83"
27 ;;
28 *AP96)
29 name="ap96"
30 ;;
31 *AW-NR580)
32 name="aw-nr580"
33 ;;
34 *"DIR-600 rev. A1")
35 name="dir-600-a1"
36 ;;
37 *"DIR-825 rev. B1")
38 name="dir-825-b1"
39 ;;
40 *EAP7660D)
41 name="eap7660d"
42 ;;
43 *JA76PF)
44 name="ja76pf"
45 ;;
46 *"Bullet M")
47 name="bullet-m"
48 ;;
49 *"Nanostation M")
50 name="nanostation-m"
51 ;;
52 *JWAP003)
53 name="jwap003"
54 ;;
55 *LS-SR71)
56 name="ls-sr71"
57 ;;
58 *MZK-W04NU)
59 name="mzk-w04nu"
60 ;;
61 *MZK-W300NH)
62 name="mzk-w300nh"
63 ;;
64 *"NBG460N/550N/550NH")
65 name="nbg460n_550n_550nh"
66 ;;
67 *OM2P)
68 name="om2p"
69 ;;
70 *PB42)
71 name="pb42"
72 ;;
73 *PB44)
74 name="pb44"
75 ;;
76 *PB92)
77 name="pb92"
78 ;;
79 *"RouterBOARD 411/A/AH")
80 name="rb-411"
81 ;;
82 *"RouterBOARD 411U")
83 name="rb-411u"
84 ;;
85 *"RouterBOARD 433/AH")
86 name="rb-433"
87 ;;
88 *"RouterBOARD 433UAH")
89 name="rb-433u"
90 ;;
91 *"RouterBOARD 450")
92 name="rb-450"
93 ;;
94 *"RouterBOARD 450G")
95 name="rb-450g"
96 ;;
97 *"RouterBOARD 493/AH")
98 name="rb-493"
99 ;;
100 *"RouterBOARD 493G")
101 name="rb-493g"
102 ;;
103 *"RouterBOARD 750")
104 name="rb-750"
105 ;;
106 *"Rocket M")
107 name="rocket-m"
108 ;;
109 *RouterStation)
110 name="routerstation"
111 ;;
112 *"RouterStation Pro")
113 name="routerstation-pro"
114 ;;
115 *TEW-632BRP)
116 name="tew-632brp"
117 ;;
118 *TL-WR1043ND)
119 name="tl-wr1043nd"
120 ;;
121 *"DIR-615 rev. C1")
122 name="dir-615-c1"
123 ;;
124 *TL-MR3220)
125 name="tl-mr3220"
126 ;;
127 *TL-MR3420)
128 name="tl-mr3420"
129 ;;
130 *TL-WA901ND)
131 name="tl-wa901nd"
132 ;;
133 *"TL-WA901ND v2")
134 name="tl-wa901nd-v2"
135 ;;
136 *TL-WR741ND)
137 name="tl-wr741nd"
138 ;;
139 *"TL-WR741ND v4")
140 name="tl-wr741nd-v4"
141 ;;
142 *"TL-WR841N v1")
143 name="tl-wr841n-v1"
144 ;;
145 *TL-WR941ND)
146 name="tl-wr941nd"
147 ;;
148 *"TL-WR703N v1")
149 name="tl-wr703n"
150 ;;
151 *UniFi)
152 name="unifi"
153 ;;
154 *WHR-G301N)
155 name="whr-g301n"
156 ;;
157 *WHR-HP-GN)
158 name="whr-hp-gn"
159 ;;
160 *WP543)
161 name="wp543"
162 ;;
163 *WNDR3700)
164 name="wndr3700"
165 ;;
166 *WNDR3700v2)
167 name="wndr3700v2"
168 ;;
169 *WNR2000)
170 name="wnr2000"
171 ;;
172 *WRT160NL)
173 name="wrt160nl"
174 ;;
175 *WRT400N)
176 name="wrt400n"
177 ;;
178 *WZR-HP-AG300H)
179 name="wzr-hp-ag300h"
180 ;;
181 *WZR-HP-G300NH)
182 name="wzr-hp-g300nh"
183 ;;
184 *WHR-HP-G300N)
185 name="whr-hp-g300n"
186 ;;
187 *ZCN-1523H-2)
188 name="zcn-1523h-2"
189 ;;
190 *ZCN-1523H-5)
191 name="zcn-1523h-5"
192 ;;
193 *)
194 name="generic"
195 ;;
196 esac
197
198 echo $name
199 }
This page took 0.058406 seconds and 5 git commands to generate.