include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.10.7
+PKG_VERSION:=2.10.8
PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
Aaron Goodman <aaronjg@alumni.stanford.edu>
env -i FIRSTCONNECT=$1 ACTION="connected" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
}
+disconnecting() {
+ if [ "$STATUS" != "disconnecting" ] ; then
+ STATUS="disconnecting"
+ echo "disconnecting" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
+ LOG notice "Interface $INTERFACE ($DEVICE) is disconnecting"
+ env -i ACTION="disconnecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
+ fi
+}
+
+connecting() {
+ if [ "$STATUS" != "connecting" ] ; then
+ STATUS="connecting"
+ echo "connecting" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
+ LOG notice "Interface $INTERFACE ($DEVICE) is connecting"
+ env -i ACTION="connecting" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /sbin/hotplug-call iface
+ fi
+}
+
disabled() {
STATUS='disabled'
echo "disabled" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
score=0
[ ${keep_failure_interval} -eq 1 ] && sleep_time=$failure_interval
else
+ disconnecting
sleep_time=$failure_interval
fi
fi
else
if [ $score -lt $((down+up)) ] && [ $lost -gt 0 ]; then
+ connecting
LOG info "Lost $((lost*count)) ping(s) on interface $INTERFACE ($DEVICE). Current score: $score"
fi
echo "online" > $MWAN3TRACK_STATUS_DIR/$INTERFACE/STATUS
score=$((down+up))
elif [ $score -le $up ]; then
+ connecting
sleep_time=$recovery_interval
fi