diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-04-28 23:27:46 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-04-28 23:27:46 +0000 |
commit | 1d2fc6aa959f390cb6e01c2d3b6720242e77ebdf (patch) | |
tree | bc177cf24e6bb165f0a12b695b0cd69ad111f049 /target/linux/atheros/base-files/etc | |
parent | b9e8692aa1fa6f6bed7e6b1cd06258c0c26db56b (diff) | |
download | upstream-1d2fc6aa959f390cb6e01c2d3b6720242e77ebdf.tar.gz upstream-1d2fc6aa959f390cb6e01c2d3b6720242e77ebdf.tar.bz2 upstream-1d2fc6aa959f390cb6e01c2d3b6720242e77ebdf.zip |
atheros: configure eth1 as wan interface by default, if present
SVN-Revision: 15473
Diffstat (limited to 'target/linux/atheros/base-files/etc')
-rw-r--r-- | target/linux/atheros/base-files/etc/uci-defaults/network | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/atheros/base-files/etc/uci-defaults/network b/target/linux/atheros/base-files/etc/uci-defaults/network index 4f6ff61790..68b9a2a27d 100644 --- a/target/linux/atheros/base-files/etc/uci-defaults/network +++ b/target/linux/atheros/base-files/etc/uci-defaults/network @@ -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 |