atheros: configure eth1 as wan interface by default, if present

SVN-Revision: 15473
This commit is contained in:
Felix Fietkau 2009-04-28 23:27:46 +00:00
parent b9e8692aa1
commit 1d2fc6aa95

View file

@ -8,6 +8,7 @@ set network.wan=interface
set network.wan.ifname=eth0.2 set network.wan.ifname=eth0.2
set network.wan.proto=dhcp set network.wan.proto=dhcp
EOF EOF
HAS_SWITCH=1
fi fi
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" ]; then 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.vlan=2
set network.eth0_2.ports="4 5t" set network.eth0_2.ports="4 5t"
EOF EOF
HAS_SWITCH=1
fi 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 uci commit network