[brcm63xx] add support for D-Link DVA-G3810BN/TL
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / base-files / etc / init.d / defconfig
1 #!/bin/sh /etc/rc.common
2 #
3 # Copyright (C) 2009 OpenWrt.org
4 #
5
6 START=05
7
8 start() {
9 local board=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
10
11 if [ "$board" = "96358VW" ] && [ -e /proc/switch/eth1/enable ]; then
12 board="DVAG3810BN"
13 fi
14
15 [ ! -d /etc/defconfig/$board ] && board="generic"
16
17 for f in $( ls /etc/defconfig/$board ); do
18 if [ ! -e /etc/config/$f ]; then
19 cp /etc/defconfig/$board/$f /etc/config/
20 fi
21 done
22 }