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
This commit is contained in:
parent
d89aa2c3d6
commit
1c2dbe4e94
2 changed files with 24 additions and 0 deletions
3
target/linux/bcm53xx/base-files.mk
Normal file
3
target/linux/bcm53xx/base-files.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
define Package/base-files/install-target
|
||||
rm -f $(1)/etc/config/network
|
||||
endef
|
21
target/linux/bcm53xx/base-files/etc/uci-defaults/02_network
Normal file
21
target/linux/bcm53xx/base-files/etc/uci-defaults/02_network
Normal file
|
@ -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
|
Loading…
Reference in a new issue