mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 00:21:07 +02:00
atheros: configure eth1 as wan interface by default, if present
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15473 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
25bb83b695
commit
b613132f29
@ -8,6 +8,7 @@ set network.wan=interface
|
||||
set network.wan.ifname=eth0.2
|
||||
set network.wan.proto=dhcp
|
||||
EOF
|
||||
HAS_SWITCH=1
|
||||
fi
|
||||
|
||||
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" ]; then
|
||||
@ -24,6 +25,15 @@ set network.eth0_2.device=eth0
|
||||
set network.eth0_2.vlan=2
|
||||
set network.eth0_2.ports="4 5t"
|
||||
EOF
|
||||
HAS_SWITCH=1
|
||||
fi
|
||||
|
||||
[ -z "$HAS_SWITCH" -a -d /sys/class/net/eth1 ] && {
|
||||
uci batch <<EOF
|
||||
set network.wan=interface
|
||||
set network.wan.ifname=eth1
|
||||
set network.wan.proto=dhcp
|
||||
EOF
|
||||
}
|
||||
|
||||
uci commit network
|
||||
|
Loading…
x
Reference in New Issue
Block a user