mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Changes on netifd and modemmanager to use the defaultroute setting
This commit is contained in:
parent
90e0c41dc6
commit
571d37e147
23 changed files with 1918 additions and 0 deletions
23
netifd/files/etc/uci-defaults/14_migrate-dhcp-release
Normal file
23
netifd/files/etc/uci-defaults/14_migrate-dhcp-release
Normal file
|
@ -0,0 +1,23 @@
|
|||
. /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
|
Loading…
Add table
Add a link
Reference in a new issue