aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
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
commite8fcadf51da68688099e748914db41906d5a5457 (patch)
tree2d15117883139865c4680ed0929e0ec76a73c532 /package/base-files
parent05e366cf700345eeafdc79f80d2ec885fa5e976b (diff)
downloadmaster-187ad058-e8fcadf51da68688099e748914db41906d5a5457.tar.gz
master-187ad058-e8fcadf51da68688099e748914db41906d5a5457.tar.bz2
master-187ad058-e8fcadf51da68688099e748914db41906d5a5457.zip
base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48493 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/board.d/99-default_network17
-rw-r--r--package/base-files/files/etc/config/network18
2 files changed, 17 insertions, 18 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
diff --git a/package/base-files/files/etc/config/network b/package/base-files/files/etc/config/network
deleted file mode 100644
index d3cd3c613a..0000000000
--- a/package/base-files/files/etc/config/network
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (C) 2006 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 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
-
-config globals globals
- option ula_prefix auto