aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/orion/base-files/etc/board.d/02_network
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-12-04 14:39:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-12-04 14:39:14 +0000
commit2f042b452e345593fce50e31959821abfc1c4fa2 (patch)
treebc5eb4b2843325ca9b6dab36d937eede4ea2102d /target/linux/orion/base-files/etc/board.d/02_network
parentb6a9c5c40095701eeaf48819e047ba231a3f2748 (diff)
downloadupstream-2f042b452e345593fce50e31959821abfc1c4fa2.tar.gz
upstream-2f042b452e345593fce50e31959821abfc1c4fa2.tar.bz2
upstream-2f042b452e345593fce50e31959821abfc1c4fa2.zip
orion: convert initial network configuration to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47759
Diffstat (limited to 'target/linux/orion/base-files/etc/board.d/02_network')
-rwxr-xr-xtarget/linux/orion/base-files/etc/board.d/02_network15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/orion/base-files/etc/board.d/02_network b/target/linux/orion/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..96cd083c45
--- /dev/null
+++ b/target/linux/orion/base-files/etc/board.d/02_network
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults-new.sh
+
+board_config_update
+
+if grep -q lan1 /proc/net/dev; then
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+else
+ ucidef_set_interface_lan "eth0"
+fi
+
+board_config_flush
+
+exit 0