Skip to content
Snippets Groups Projects
Commit 2ebcf929 authored by nbd's avatar nbd
Browse files

orion: dynamically generate /etc/config/network, the LaCie 2big Network does not use DSA


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37061 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent 3ded2b24
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2008 OpenWrt.org config_simple() {
cat >> /etc/config/network <<EOF
config interface loopback config interface lan
option ifname lo option ifname eth0
option proto static option type bridge
option ipaddr 127.0.0.1 option proto static
option netmask 255.0.0.0 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 config interface eth0
option ifname eth0 option ifname eth0
...@@ -15,11 +21,11 @@ config interface wan ...@@ -15,11 +21,11 @@ config interface wan
option hostname openwrt option hostname openwrt
config interface lan config interface lan
option ifname "lan1 lan2 lan3 lan4" option ifname "lan1 lan2 lan3 lan4"
option type bridge option type bridge
option proto static option proto static
option ipaddr 192.168.1.1 option ipaddr 192.168.1.1
option netmask 255.255.255.0 option netmask 255.255.255.0
option ip6assign 60 option ip6assign 60
config interface wan6 config interface wan6
...@@ -28,3 +34,20 @@ config interface wan6 ...@@ -28,3 +34,20 @@ config interface wan6
config globals globals config globals globals
option ula_prefix auto 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment