You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
425 B
Plaintext
24 lines
425 B
Plaintext
. /lib/functions.sh
|
|
|
|
migrate_release() {
|
|
local config="$1"
|
|
local proto
|
|
local release
|
|
|
|
config_get proto "$config" proto
|
|
config_get release "$config" release
|
|
|
|
[ "$proto" = "dhcp" ] && [ -n "$release" ] && {
|
|
norelease="$((!$release))"
|
|
uci_set network "$config" norelease "$norelease"
|
|
uci_remove network "$config" release
|
|
}
|
|
|
|
}
|
|
|
|
config_load network
|
|
config_foreach migrate_release interface
|
|
uci commit network
|
|
|
|
exit 0
|