]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Also check for ./__lagdetect.awk
authorJohannes Truschnigg <johannes@truschnigg.info>
Fri, 18 Mar 2022 13:32:11 +0000 (14:32 +0100)
committerJohannes Truschnigg <johannes@truschnigg.info>
Fri, 18 Mar 2022 13:32:11 +0000 (14:32 +0100)
lagdetect.sh

index 37769dcdf370702e245b93b73753f24a56aaba88..8fe0eb177f3f39eef93d526329515134c1139034 100755 (executable)
@@ -91,6 +91,13 @@ do
 done
 
 
+if ! test -r ./__lagdetect.awk
+then
+  printf 'FATAL: "__lagdetect.awk" not found; are you in the correct directory?"\n'
+  exit 1
+fi
+
+
 if [ x"${PING_GW_IPV6:-no}" = xyes ]
 then
   PING_PEERS="$(traceroute -6 -n -m 2001:4860:4860::8888 | awk '{if("1" == $1){print $2}}') ${PING_PEERS}"
@@ -193,4 +200,4 @@ fping --loop --retry=1 --size=1280 --period="${PING_INTERVAL}" --random ${PING_P
   -v PINGSLOTS="${PING_SLOTS_PER_PEER}" \
   -v FUDGE="${FUDGE_MS}" \
   -v PING_PEERS="${PING_PEERS}" \
-  -f __lagdetect.awk
+  -f ./__lagdetect.awk