Просмотр исходного кода

Use default network configuration

Fixes problem with router advertisment previously
enabled by default on the lan interface.
Mikael Magnusson 7 лет назад
Родитель
Сommit
0c5ad68128
2 измененных файлов с 17 добавлено и 10 удалено
  1. 17 0
      files/etc/board.d/99-default_network
  2. 0 10
      files/etc/config/network

+ 17 - 0
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' dhcp
+[ -d /sys/class/net/eth1 ] && ucidef_set_interface_wan 'eth1'
+
+board_config_flush
+
+exit 0

+ 0 - 10
files/etc/config/network

@@ -1,10 +0,0 @@
-
-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 'dhcp'