2013-11-05 08:00:34 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2014-11-06 02:23:12 +00:00
|
|
|
# Copyright (C) 2013-2014 OpenWrt.org
|
2013-11-05 08:00:34 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/network ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/network
|
|
|
|
|
2015-01-30 00:14:17 +00:00
|
|
|
. /lib/sunxi.sh
|
2013-11-05 08:00:34 +00:00
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
|
|
|
|
ucidef_set_interface_loopback
|
|
|
|
|
2015-01-30 00:14:17 +00:00
|
|
|
case "$( sunxi_board_name )" in
|
|
|
|
"olinuxino-micro"*)
|
2014-05-01 10:23:55 +00:00
|
|
|
ucidef_set_interface_lan 'wlan0'
|
|
|
|
;;
|
2015-01-30 00:17:16 +00:00
|
|
|
"lamobo-r1")
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
|
|
|
ucidef_add_switch "switch0" "1" "1"
|
|
|
|
ucidef_add_switch_vlan "switch0" "1" "4 0 1 2 8t"
|
|
|
|
ucidef_add_switch_vlan "switch0" "2" "3 8t"
|
|
|
|
;;
|
2015-01-30 00:14:17 +00:00
|
|
|
*)
|
|
|
|
ucidef_set_interface_lan 'eth0'
|
|
|
|
;;
|
2013-11-05 08:00:34 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
uci commit network
|
|
|
|
|
|
|
|
exit 0
|