summaryrefslogtreecommitdiff
path: root/target/linux/bcm53xx/base-files/etc
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-04-23 22:02:18 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-04-23 22:02:18 +0000
commit1c2dbe4e948b6012cd18e166613feca6d41714fa (patch)
treee001e4ec760eb6fe14dd5720797213e38a3c1ada /target/linux/bcm53xx/base-files/etc
parentd89aa2c3d69c564d49df0348059af9e041b3ad03 (diff)
downloadmtk-20170518-1c2dbe4e948b6012cd18e166613feca6d41714fa.zip
mtk-20170518-1c2dbe4e948b6012cd18e166613feca6d41714fa.tar.gz
mtk-20170518-1c2dbe4e948b6012cd18e166613feca6d41714fa.tar.bz2
bcm53xx: add default config for switch
This scripts adds a default config for the switch. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 40565
Diffstat (limited to 'target/linux/bcm53xx/base-files/etc')
-rw-r--r--target/linux/bcm53xx/base-files/etc/uci-defaults/02_network21
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/uci-defaults/02_network b/target/linux/bcm53xx/base-files/etc/uci-defaults/02_network
new file mode 100644
index 0000000..7517d07
--- /dev/null
+++ b/target/linux/bcm53xx/base-files/etc/uci-defaults/02_network
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
+. /lib/functions/uci-defaults.sh
+
+ucidef_set_interface_loopback
+
+ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ucidef_add_switch "switch0" "1" "1"
+ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
+ucidef_add_switch_vlan "switch0" "2" "4 5t"
+
+uci commit network
+
+exit 0