aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/board.d
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-25 16:30:41 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-25 16:30:41 +0000
commit57776e68ce7f065fbc96c439704de65d37be12db (patch)
treecde53fe2d74d9c2161bc695bb52dd2516ca1bd8f /package/base-files/files/etc/board.d
parent1d2c63c45518030171766c666755eac5f1bd4fd2 (diff)
downloadupstream-57776e68ce7f065fbc96c439704de65d37be12db.tar.gz
upstream-57776e68ce7f065fbc96c439704de65d37be12db.tar.bz2
upstream-57776e68ce7f065fbc96c439704de65d37be12db.zip
base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48493
Diffstat (limited to 'package/base-files/files/etc/board.d')
-rwxr-xr-xpackage/base-files/files/etc/board.d/99-default_network17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/base-files/files/etc/board.d/99-default_network b/package/base-files/files/etc/board.d/99-default_network
new file mode 100755
index 0000000000..d70aa352b9
--- /dev/null
+++ b/package/base-files/files/etc/board.d/99-default_network
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Copyright (C) 2013-2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+json_is_a network object && exit 0
+
+ucidef_set_interface_lan 'eth0'
+[ -d /sys/class/net/eth1 ] && ucidef_set_interface_wan 'eth1'
+
+board_config_flush
+
+exit 0