mediatek: fix IPv4-only corner case and commit in 99-net-ps
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 16 Jun 2020 12:46:42 +0000 (14:46 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 16 Jun 2020 12:46:42 +0000 (14:46 +0200)
The uci config section network.globals set up in /bin/config_generate
will only be created if /proc/sys/net/ipv6 exists.

Correspondingly, lacking IPv6 support, the command
uci set network.globals.packet_steering=1
will fail with "uci: Invalid argument" as the network.globals config
has not been set up.

Fix that by adding the setup there as well.

While at it, limit the uci commit to the network config file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps

index accb72916e37a73325fe8826e8071b7a1beedcaf..596b33c5b4893ac7e3dc2ba4a381930bd7324040 100755 (executable)
@@ -1,3 +1,4 @@
+uci set network.globals='globals'
 uci set network.globals.packet_steering=1
 uci set network.eth0=device
 uci set network.eth0.name=eth0
 uci set network.globals.packet_steering=1
 uci set network.eth0=device
 uci set network.eth0.name=eth0
@@ -9,5 +10,7 @@ uci set network.lan2=device
 uci set network.lan2.name=lan2
 uci set network.lan3=device
 uci set network.lan3.name=lan3
 uci set network.lan2.name=lan2
 uci set network.lan3=device
 uci set network.lan3.name=lan3
-uci commit
+
+uci commit network
+
 exit 0
 exit 0