|
|
@ -1,6 +1,6 @@
|
|
|
|
#!/bin/sh
|
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Copyright (C) 2012-2014 OpenWrt.org
|
|
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
[ -e /etc/config/network ] && exit 0
|
|
|
|
[ -e /etc/config/network ] && exit 0
|
|
|
@ -20,13 +20,15 @@ set network.lan6.reqprefix='no'
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
. /lib/functions/uci-defaults-new.sh
|
|
|
|
. /lib/kirkwood.sh
|
|
|
|
. /lib/kirkwood.sh
|
|
|
|
|
|
|
|
|
|
|
|
board=$(kirkwood_board_name)
|
|
|
|
board_config_update
|
|
|
|
|
|
|
|
|
|
|
|
ucidef_set_interface_loopback
|
|
|
|
ucidef_set_interface_loopback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
board=$(kirkwood_board_name)
|
|
|
|
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
case "$board" in
|
|
|
|
"dockstar"|\
|
|
|
|
"dockstar"|\
|
|
|
|
"goflexhome"|\
|
|
|
|
"goflexhome"|\
|
|
|
@ -35,29 +37,25 @@ case "$board" in
|
|
|
|
"ib62x0"|\
|
|
|
|
"ib62x0"|\
|
|
|
|
"nsa310s"|\
|
|
|
|
"nsa310s"|\
|
|
|
|
"pogo_e02")
|
|
|
|
"pogo_e02")
|
|
|
|
set_lan_dhcp "eth0"
|
|
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"linksys-audi")
|
|
|
|
"linksys-audi")
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
ucidef_add_switch "switch0" "1" "1"
|
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
|
|
|
|
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
|
|
|
|
|
|
|
|
ucidef_add_switch_vlan "switch0" "2" "4 6"
|
|
|
|
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"linksys-viper")
|
|
|
|
"linksys-viper")
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
ucidef_add_switch "switch0" "1" "1"
|
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
|
|
|
|
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
|
|
|
|
|
|
|
|
ucidef_add_switch_vlan "switch0" "2" "4 6"
|
|
|
|
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"guruplug-server-plus")
|
|
|
|
"guruplug-server-plus")
|
|
|
|
set_lan_dhcp "eth0" "eth1"
|
|
|
|
ucidef_set_interface_lan "eth0 eth1" "dhcp"
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"sheevaplug" | \
|
|
|
|
"sheevaplug" | \
|
|
|
|
"sheevaplug-esata")
|
|
|
|
"sheevaplug-esata")
|
|
|
|
set_lan_dhcp "eth0"
|
|
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
*)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
ucidef_set_interface_lan "eth0" "static"
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
|