mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Fix network update
This commit is contained in:
parent
d7c8955893
commit
69fe4025ae
1 changed files with 13 additions and 0 deletions
|
@ -31,6 +31,16 @@ _setup_macvlan() {
|
||||||
_setup_macaddr "$1_dev" "${_macaddr:-auto$(date +%s)}"
|
_setup_macaddr "$1_dev" "${_macaddr:-auto$(date +%s)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_setup_macvlan_update() {
|
||||||
|
uci -q get "network.$1_dev.ifname" >/dev/null || return
|
||||||
|
|
||||||
|
uci -q batch <<-EOF
|
||||||
|
set macvlan.$1=macvlan
|
||||||
|
set macvlan.$1.ifname=$_ifname
|
||||||
|
commit macvlan
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
_setup_multipath_off() {
|
_setup_multipath_off() {
|
||||||
uci -q get "network.$1.multipath" >/dev/null && return
|
uci -q get "network.$1.multipath" >/dev/null && return
|
||||||
uci -q set "network.$1.multipath=off"
|
uci -q set "network.$1.multipath=off"
|
||||||
|
@ -51,6 +61,9 @@ _setup_wan_interface() {
|
||||||
[ -n "$4" ] && uci -q set network.$1.type=$4
|
[ -n "$4" ] && uci -q set network.$1.type=$4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config_load network
|
||||||
|
config_foreach _setup_macvlan_update interface
|
||||||
|
|
||||||
if [ "$(uci -q get network.lan.multipath)" != "" ]; then
|
if [ "$(uci -q get network.lan.multipath)" != "" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue