forked from Ivasoft/openwrt
octeon: add basic board detection
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41274
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
|
||||
config interface loopback
|
||||
option ifname lo
|
||||
option proto static
|
||||
option ipaddr 127.0.0.1
|
||||
option netmask 255.0.0.0
|
||||
|
||||
config interface lan
|
||||
option ifname eth1
|
||||
option type bridge
|
||||
option proto static
|
||||
option ipaddr 192.168.1.1
|
||||
option netmask 255.255.255.0
|
||||
|
||||
config interface wan
|
||||
option ifname eth0
|
||||
option proto dhcp
|
||||
31
target/linux/octeon/base-files/etc/uci-defaults/01_network
Normal file
31
target/linux/octeon/base-files/etc/uci-defaults/01_network
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/network ] && exit 0
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/octeon.sh
|
||||
|
||||
touch /etc/config/network
|
||||
|
||||
board=$(octeon_board_name)
|
||||
|
||||
case "$board" in
|
||||
erlite)
|
||||
ucidef_set_interface_loopback
|
||||
ucidef_set_interface_lan 'eth0'
|
||||
ucidef_set_interface_wan 'eth1'
|
||||
;;
|
||||
|
||||
*)
|
||||
ucidef_set_interface_loopback
|
||||
ucidef_set_interface_wan 'eth1'
|
||||
ucidef_set_interface_lan 'eth0'
|
||||
;;
|
||||
esac
|
||||
|
||||
uci commit network
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user