mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Change VPN to use device instead of ifname
This commit is contained in:
parent
dd16ae03f5
commit
1f15378d56
4 changed files with 6 additions and 5 deletions
|
@ -49,7 +49,7 @@ start_instance() {
|
|||
key=""
|
||||
|
||||
if [ "$(uci -q get network.omrvpn)" != "" ] && [ "$(uci -q get network.omrvpn)" != "$dev" ]; then
|
||||
uci -q set network.omrvpn.ifname=$dev
|
||||
uci -q set network.omrvpn.device=$dev
|
||||
uci -q commit
|
||||
fi
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ start_instance() {
|
|||
key=""
|
||||
|
||||
if [ "$(uci -q get network.omrvpn)" != "" ]; then
|
||||
uci -q set network.omrvpn.ifname=$dev
|
||||
uci -q set network.omrvpn.device=$dev
|
||||
uci -q commit
|
||||
fi
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ start_instance() {
|
|||
key=""
|
||||
|
||||
if [ "$(uci -q get network.omrvpn)" != "" ]; then
|
||||
uci -q set network.omrvpn.ifname=${dev}
|
||||
uci -q set network.omrvpn.device=${dev}
|
||||
uci -q commit network
|
||||
fi
|
||||
_log "starting ${PROG_NAME} ${1} instance $*"
|
||||
|
|
|
@ -13,7 +13,8 @@ interface_multipath_settings() {
|
|||
mode="$(uci -q get openmptcprouter.$config.multipath)"
|
||||
}
|
||||
[ "$mode" = "off" ] || [ "$mode" = "" ] && return 1
|
||||
config_get ifname "$config" ifname
|
||||
config_get ifname "$config" device
|
||||
[ -z "$ifname" ] && config_get ifname "$config" ifname
|
||||
[ -z "$ifname" ] && ifname=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
|
||||
[ -z "$ifname" ] && return 1
|
||||
|
@ -46,7 +47,7 @@ start() {
|
|||
firstport="$(uci -q get mlvpn.general.firstport)"
|
||||
|
||||
if [ "$(uci -q get network.omrvpn)" != "${interface_name}" ]; then
|
||||
uci -q set network.omrvpn.ifname=${interface_name}
|
||||
uci -q set network.omrvpn.device=${interface_name}
|
||||
uci -q commit
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue