diff options
author | John Crispin <blogic@openwrt.org> | 2014-07-12 06:50:21 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-07-12 06:50:21 +0000 |
commit | bcf21c1fd25c14d3f6e3a409be2a27ff51ecfe14 (patch) | |
tree | 6ceec3d74577feb426cb4a9249e4d802fdc9bc74 /target/linux/brcm2708 | |
parent | c04ed164b05e5f461135bafeb35a014937283c80 (diff) | |
download | upstream-bcf21c1fd25c14d3f6e3a409be2a27ff51ecfe14.tar.gz upstream-bcf21c1fd25c14d3f6e3a409be2a27ff51ecfe14.tar.bz2 upstream-bcf21c1fd25c14d3f6e3a409be2a27ff51ecfe14.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41583 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708')
-rw-r--r-- | target/linux/brcm2708/base-files/etc/config/network | 13 | ||||
-rw-r--r-- | target/linux/brcm2708/base-files/etc/uci-defaults/02_network | 15 |
2 files changed, 15 insertions, 13 deletions
diff --git a/target/linux/brcm2708/base-files/etc/config/network b/target/linux/brcm2708/base-files/etc/config/network deleted file mode 100644 index 1d5ded3728..0000000000 --- a/target/linux/brcm2708/base-files/etc/config/network +++ /dev/null @@ -1,13 +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 proto static - option ipaddr 192.168.1.1 - option netmask 255.255.255.0 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 |