mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Get device from l3_device
This commit is contained in:
parent
5f9cee0fda
commit
799b129336
2 changed files with 5 additions and 4 deletions
|
@ -6,9 +6,9 @@ set_route() {
|
|||
INTERFACE=$1
|
||||
PREVINTERFACE=$2
|
||||
multipath_config=$(uci -q get network.$INTERFACE.multipath || echo "off")
|
||||
interface_if=$(uci -q get network.$INTERFACE.ifname)
|
||||
[ -z "$interface_if" ] && interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]')
|
||||
interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname)
|
||||
multipath_current_config=$(multipath $interface_if | grep 'deactivated')
|
||||
if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$multipath_current_config" = "" ]; then
|
||||
interface_gw="$(uci -q get network.$INTERFACE.gateway)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue