1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31:51 +00:00

Fix hotplug actions send by OMR-Tracker Post-Tracking scripts

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-11-24 07:41:02 +01:00
parent 567d6a3e00
commit 35e4ead594
2 changed files with 2 additions and 2 deletions

View file

@ -146,7 +146,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || { [ "$OMR_TRACKER_INTERFACE" != "omrvp
fi
if [ -n "$OMR_TRACKER_INTERFACE" ]; then
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down'
env -i ACTION="disconnecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
env -i ACTION="disconnecting" INTERFACE="$OMR_TRACKER_INTERFACE" DEVICE="$OMR_TRACKER_DEVICE" /sbin/hotplug-call iface
fi
#if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then
# multipath "$OMR_TRACKER_DEVICE" off > /dev/null 2>&1

View file

@ -155,7 +155,7 @@ if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR
}
script_alert_up="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_up)"
[ -n "$script_alert_up" ] && eval $script_alert_up
env -i ACTION="connecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
env -i ACTION="connecting" INTERFACE="$OMR_TRACKER_INTERFACE" DEVICE="$OMR_TRACKER_DEVICE" /sbin/hotplug-call iface
fi
if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up'