From 8390c42e126c904a4b127299b1e6c69655f7bc1b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 14 Sep 2023 11:13:47 +0200 Subject: [PATCH] Change sleep duration for omr-tracker after error --- mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking index b29484d6d0..3c1a64006f 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking @@ -744,7 +744,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then modem_device=$(mmcli -m $modem -K | grep 'modem.generic.device ' | awk '{print $3}') [ -n "$modem_device" ] && modem_interface=$(uci show network | grep $modem_device | awk -F. '{print $2}') [ -n "$modem_interface" ] && { - _log "No anwser from $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE), restart associed interface $modem_interface" + _log "No answer from $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE), restart associed interface $modem_interface" ifup $modem_interface } fi @@ -900,9 +900,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then # Set a little sleep after an interface error if [ -n "$RANDOM" ]; then - sleep `expr $RANDOM % 10` + sleep `expr $RANDOM % 100` else - sleep `awk 'BEGIN{srand();print int(rand()*9)}'` + sleep `awk 'BEGIN{srand();print int(rand()*20)}'` fi exit 0