diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-06-28 11:26:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-06-28 11:26:37 +0000 |
commit | 74e55be83a6ecbdd32367931bae55fe43a93191f (patch) | |
tree | 8760db011fa259b28abf88b3ae8467805f6bcf16 /target/linux/orion | |
parent | 55c0013e406023d1805253a47476638354e6dfd7 (diff) | |
download | master-187ad058-74e55be83a6ecbdd32367931bae55fe43a93191f.tar.gz master-187ad058-74e55be83a6ecbdd32367931bae55fe43a93191f.tar.bz2 master-187ad058-74e55be83a6ecbdd32367931bae55fe43a93191f.zip |
orion: dynamically generate /etc/config/network, the LaCie 2big Network does not use DSA
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37061 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/orion')
-rw-r--r-- | target/linux/orion/base-files/etc/config/network | 30 | ||||
-rw-r--r-- | target/linux/orion/base-files/etc/uci-defaults/10-network | 53 |
2 files changed, 53 insertions, 30 deletions
diff --git a/target/linux/orion/base-files/etc/config/network b/target/linux/orion/base-files/etc/config/network deleted file mode 100644 index b527a88769..0000000000 --- a/target/linux/orion/base-files/etc/config/network +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2008 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 eth0 - option ifname eth0 - -config interface wan - option ifname wan - option proto dhcp - option hostname openwrt - -config interface lan - option ifname "lan1 lan2 lan3 lan4" - option type bridge - option proto static - option ipaddr 192.168.1.1 - option netmask 255.255.255.0 - option ip6assign 60 - -config interface wan6 - option ifname @wan - option proto dhcpv6 - -config globals globals - option ula_prefix auto diff --git a/target/linux/orion/base-files/etc/uci-defaults/10-network b/target/linux/orion/base-files/etc/uci-defaults/10-network new file mode 100644 index 0000000000..3baa679a8b --- /dev/null +++ b/target/linux/orion/base-files/etc/uci-defaults/10-network @@ -0,0 +1,53 @@ +config_simple() { +cat >> /etc/config/network <<EOF +config interface lan + option ifname eth0 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + option ip6assign 60 +EOF +} + +config_dsa() { +cat >> /etc/config/network <<EOF +config interface eth0 + option ifname eth0 + +config interface wan + option ifname wan + option proto dhcp + option hostname openwrt + +config interface lan + option ifname "lan1 lan2 lan3 lan4" + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + option ip6assign 60 + +config interface wan6 + option ifname @wan + option proto dhcpv6 + +config globals globals + option ula_prefix auto +EOF +} + +cat > /etc/config/network <<EOF +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +EOF + +if grep -q lan /proc/net/dev; then + config_dsa +else + config_simple +fi |