mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix
This commit is contained in:
parent
97fa071f33
commit
9181796fcd
3 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ interface_multipath_settings() {
|
||||||
[ -z "$gateway" ] && gateway=$(uci -q get "network.$config.gateway")
|
[ -z "$gateway" ] && gateway=$(uci -q get "network.$config.gateway")
|
||||||
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -q -e '@.route[0].nexthop' | tr -d "\n")
|
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -q -e '@.route[0].nexthop' | tr -d "\n")
|
||||||
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||||
[ -z "$gateway" ] && gateway=$(ubus call network.interface.${config}_4 status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
[ -z "$gateway" ] && gateway=$(ubus call network.interface.${config}_4 status 2>/dev/null | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||||
netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
|
netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
|
||||||
network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
|
network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,7 +8,7 @@ set_route() {
|
||||||
multipath_config=$(uci -q get network.$INTERFACE.multipath || echo "off")
|
multipath_config=$(uci -q get network.$INTERFACE.multipath || echo "off")
|
||||||
interface_if=$(uci -q get network.$INTERFACE.ifname)
|
interface_if=$(uci -q get network.$INTERFACE.ifname)
|
||||||
[ -z "$interface_if" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["l3_device"]')
|
[ -z "$interface_if" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["l3_device"]')
|
||||||
[ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" | jsonfilter -q -e '@["l3_device"]')
|
[ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]')
|
||||||
multipath_current_config=$(multipath $interface_if | grep deactivated)
|
multipath_current_config=$(multipath $interface_if | grep deactivated)
|
||||||
if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$multipath_current_config" = "" ]; then
|
if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$multipath_current_config" = "" ]; then
|
||||||
#if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ]; then
|
#if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ]; then
|
||||||
|
|
|
@ -158,7 +158,7 @@ while true; do
|
||||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||||
fi
|
fi
|
||||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.${OMR_TRACKER_INTERFACE}_4 status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.${OMR_TRACKER_INTERFACE}_4 status 2>/dev/null | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# execute specific tracker
|
# execute specific tracker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue