summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-01 22:48:51 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-01 22:48:51 +0000
commit52d2b347d2e5ff02234951facb5d163fb1d5bf36 (patch)
tree353d6758019ef27c140a93248ebb53eb5b3d0461 /target/linux/ramips/base-files/etc/uci-defaults
parenta0f4e5c8deb63826fe6658170612fa1354a7756a (diff)
ramips: remove default network configuration, and generate that from uci-defaults
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29387 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/base-files/etc/uci-defaults')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network9
1 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index 7cb6b833a7..a00e162d01 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -58,8 +58,11 @@ ramips_setup_interfaces()
*)
RT3X5X=`cat /proc/cpuinfo | grep RT3.5`
- [ -z "${RT3X5X}" ] || \
+ if [ -n "${RT3X5X}" ]; then
ucidef_set_interfaces_lan_wan "eth0.1 eth0.2"
+ else
+ ucidef_set_interfaces_lan_wan "eth0 eth1"
+ fi
;;
esac
}
@@ -88,6 +91,10 @@ ramips_setup_macs()
[ -n $wan_mac ] && ucidef_set_interface_macaddr wan $wan_mac
}
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
board=$(ramips_board_name)
ramips_setup_interfaces $board