summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/base-files/etc/init.d
diff options
context:
space:
mode:
authorcshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-11-28 22:04:19 +0000
committercshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-11-28 22:04:19 +0000
commit2ce35911df2b85275e9e6204365b51e3f4dfb75d (patch)
treebbb3b41eb3048447c66523ebb930224aac981752 /target/linux/brcm63xx/base-files/etc/init.d
parentf5de36237bd4e19e47591cd8d2da7de2cd89e095 (diff)
bcm63xx: Add defconfigs.
Port the mechanism for different default configurations from ar71xx and use the old configuration as the default configuration. This should have no functional differences to before. While we are at it, remove the obsolete nat option. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24185 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/base-files/etc/init.d')
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/init.d/defconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/base-files/etc/init.d/defconfig b/target/linux/brcm63xx/base-files/etc/init.d/defconfig
new file mode 100755
index 0000000000..dac9c23440
--- /dev/null
+++ b/target/linux/brcm63xx/base-files/etc/init.d/defconfig
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+
+START=05
+
+start() {
+ local board=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
+
+ [ ! -d /etc/defconfig/$board ] && board="generic"
+
+ for f in $( ls /etc/defconfig/$board ); do
+ if [ ! -e /etc/config/$f ]; then
+ cp /etc/defconfig/$board/$f /etc/config/
+ fi
+ done
+}