base-files: uci-defaults-new: only emit force_link for additional ifaces
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 30 Nov 2015 10:55:43 +0000 (10:55 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 30 Nov 2015 10:55:43 +0000 (10:55 +0000)
Only se4t the force_link property for non-lan, non-wan ifaces as it is
unnecessary in the default cases.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47675

package/base-files/files/bin/config_generate

index b6675f12ce3fb1d0707cfb579e00ccab3dba38d6..6da386faff18b95bb42fc5090460c60e87142207 100755 (executable)
@@ -49,7 +49,6 @@ generate_network() {
                delete network.$1
                set network.$1='interface'
                set network.$1.ifname='$ifname'
-               set network.$1.force_link=1
                set network.$1.proto='none'
                set network.$1.macaddr='$macaddr'
        EOF
@@ -64,6 +63,7 @@ generate_network() {
                                set network.$1.ip6assign='60'
                        EOF
                ;;
+
                wan)
                        uci -q batch <<-EOF
                                set network.$1.proto='dhcp'
@@ -73,6 +73,12 @@ generate_network() {
                                set network.wan6.proto='dhcpv6'
                        EOF
                ;;
+
+               *)
+                       uci -q batch <<-EOF
+                               set network.$1.force_link=1
+                       EOF
+               ;;
        esac
 }