2013-05-29 01:27:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/network ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/network
|
|
|
|
|
2013-10-16 03:25:51 +00:00
|
|
|
. /lib/functions/uci-defaults.sh
|
2014-06-18 10:08:16 +00:00
|
|
|
. /lib/imx6.sh
|
|
|
|
|
|
|
|
board=$(imx6_board_name)
|
2013-05-29 01:27:29 +00:00
|
|
|
|
2013-10-16 03:25:51 +00:00
|
|
|
ucidef_set_interface_loopback
|
2013-05-29 01:27:29 +00:00
|
|
|
|
2014-06-18 10:08:16 +00:00
|
|
|
case "$board" in
|
|
|
|
"gw51xx" |\
|
|
|
|
"gw52xx")
|
2013-09-13 21:50:35 +00:00
|
|
|
ucidef_set_interface_lan 'eth0'
|
|
|
|
;;
|
2014-06-18 10:08:16 +00:00
|
|
|
"gw53xx" |\
|
|
|
|
"gw54xx")
|
2013-09-20 01:59:30 +00:00
|
|
|
ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
|
|
|
|
;;
|
2014-06-18 10:08:16 +00:00
|
|
|
"wandboard")
|
2013-05-29 01:27:29 +00:00
|
|
|
ucidef_set_interface_wan 'eth0'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
uci commit network
|
|
|
|
|
|
|
|
exit 0
|