mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix device for DHCP
This commit is contained in:
parent
3999de02d5
commit
d82dad31ac
2 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ interface_multipath_settings() {
|
|||
network_get_ipaddr $config ipaddr
|
||||
ipaddr= $(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
|
||||
gateway=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
|
||||
[ -z "$gateway" ] && gateway=$(ubus call network.interface.wan1 status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$OMR_TRACKER_DEVICE status | jsonfilter -e '@.route[0].nexthop' | 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;}'`
|
||||
fi
|
||||
|
|
|
@ -129,7 +129,7 @@ while true; do
|
|||
OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.wan1 status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_DEVICE status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
fi
|
||||
|
||||
# execute specific tracker
|
||||
|
|
Loading…
Reference in a new issue