aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-07-12 06:50:21 +0000
committerJohn Crispin <john@openwrt.org>2014-07-12 06:50:21 +0000
commit91e2f1e9a681d7cdfbbe0e21142a68cbabe06b9f (patch)
tree76819fa59686fc6e82ab73c9d743c68018f068da /target/linux/brcm2708/base-files/etc/uci-defaults
parenta145a22f668771fc27515b3772ee757ab05f66e4 (diff)
downloadupstream-91e2f1e9a681d7cdfbbe0e21142a68cbabe06b9f.tar.gz
upstream-91e2f1e9a681d7cdfbbe0e21142a68cbabe06b9f.tar.bz2
upstream-91e2f1e9a681d7cdfbbe0e21142a68cbabe06b9f.zip
brcm2708: Use uci-defaults for network config
By using uci-defaults force_link is enabled, which fixes some link issues if ethernet cable isn't connected when LAN is initialized. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 41583
Diffstat (limited to 'target/linux/brcm2708/base-files/etc/uci-defaults')
-rw-r--r--target/linux/brcm2708/base-files/etc/uci-defaults/02_network15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/brcm2708/base-files/etc/uci-defaults/02_network b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
new file mode 100644
index 0000000000..e7e35c5226
--- /dev/null
+++ b/target/linux/brcm2708/base-files/etc/uci-defaults/02_network
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright (C) 2014 OpenWrt.org
+
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
+. /lib/functions/uci-defaults.sh
+
+ucidef_set_interface_loopback
+ucidef_set_interface_lan "eth0"
+
+uci commit network
+
+exit 0