mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-12 05:35:38 +00:00
Revert "base-files: migrate old UCI network bridge ports syntax"
This reverts commit f716c30241d5fd9d821560f58d0af0c3ffe78600. Migrating everyone to the new syntax could break downgrades. We may reintroduce it way later if needed. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
cea6631cdf
commit
80be798d4a
@ -1,23 +0,0 @@
|
|||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
migrate_ports() {
|
|
||||||
local config="$1"
|
|
||||||
local type ports ifname
|
|
||||||
|
|
||||||
config_get type "$config" type
|
|
||||||
[ "$type" != "bridge" ] && return
|
|
||||||
|
|
||||||
config_get ports "$config" ports
|
|
||||||
[ -n "$ports" ] && return
|
|
||||||
|
|
||||||
config_get ifname "$config" ifname
|
|
||||||
[ -z "$ifname" ] && return
|
|
||||||
|
|
||||||
for port in $ifname; do uci add_list network.$config.ports="$port"; done
|
|
||||||
uci delete network.$config.ifname
|
|
||||||
}
|
|
||||||
|
|
||||||
config_load network
|
|
||||||
config_foreach migrate_ports device
|
|
||||||
|
|
||||||
exit 1
|
|
Loading…
x
Reference in New Issue
Block a user