@@ -39,9 +39,7 @@ setup_network() {
39
39
uci -q set network.waneth4.name=waneth4
40
40
uci -q set network.waneth4.vid=835
41
41
fi
42
- if [ ! " $( uci -q get network.waneth4.vid) " ]; then
43
- uci -q set network.waneth4.vid=835
44
- fi
42
+ [ ! " $( uci -q get network.waneth4.vid) " ] && uci -q set network.waneth4.vid=835
45
43
46
44
# Set a wanptm0 interface if not found (fix wizard on UNO)
47
45
if [ ! " $( uci -q get network.wanptm0) " ]; then
@@ -51,10 +49,12 @@ setup_network() {
51
49
uci -q set network.wanptm0.type=8021q
52
50
uci -q set network.wanptm0.name=wanptm0
53
51
uci -q set network.wanptm0.vid=835
52
+
53
+ # workaround to avoid who already setup the MST device vlan_wan on VLAN 835
54
+ [ " $( uci -q get network.vlan_wan.vid) " == " 835" ] && uci -q set network.wanptm0.vid=836
54
55
fi
55
- if [ ! " $( uci -q get network.wanptm0.vid) " ]; then
56
- uci -q set network.wanptm0.vid=835
57
- fi
56
+ [ ! " $( uci -q get network.wanptm0.vid) " ] && uci -q set network.wanptm0.vid=835
57
+ [ ! " $( uci -q get network.wanptm0.ifname) " ] && uci -q set network.wanptm0.ifname=ptm0
58
58
59
59
# Set a SSH_wan firewall rule if not found (fix SSH Wan not working)
60
60
if [ ! " $( uci -q get firewall.SSH_wan) " ]; then
@@ -81,9 +81,7 @@ setup_network() {
81
81
fi
82
82
83
83
# Set missing wan path (Telstra)
84
- if [ ! " $( uci -q get network.wan.auto) " ]; then
85
- uci set network.wan.auto=' 1'
86
- fi
84
+ [ ! " $( uci -q get network.wan.auto) " ] && uci set network.wan.auto=' 1'
87
85
88
86
if [ ! " $( uci get -q network.config.wan_mode) " ]; then
89
87
uci set network.config=" config"
0 commit comments