aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/bin/config_generate10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index 56f6c4423b..0f6f280cf0 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -110,8 +110,14 @@ generate_network() {
}
[ -n "$ports" ] && {
- type="bridge"
- ifname="$ports"
+ uci -q batch <<-EOF
+ add network device
+ set network.@device[-1].name='$1'
+ set network.@device[-1].type='bridge'
+ EOF
+ for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
+ ifname=$1
+ type=
}
[ -n "$bridge" ] && {