base-files: emit tagged switch configuration by default
[openwrt/openwrt.git] / package / base-files / files / lib / functions / uci-defaults.sh
index 3500d49baabd06bdd0dec568dea32c942118138a..f4c1d968e2494b3bfb12e93c5a083c955a7abbbd 100755 (executable)
@@ -160,7 +160,7 @@ _ucidef_finish_switch_roles() {
                                        json_select ..
                                json_select ..
 
-                               if [ $n_vlan -gt $n_cpu -o ${need_tag:-0} -eq 1 ]; then
+                               if [ ${need_tag:-0} -eq 1 -o ${want_untag:-0} -ne 1 ]; then
                                        num="${num}t"
                                        device="${device}.${index}"
                                fi