]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Implement a few shellcheck-suggested fixes, round 2 master
authorJohannes Truschnigg <johannes@truschnigg.info>
Sun, 4 Sep 2022 09:18:43 +0000 (11:18 +0200)
committerJohannes Truschnigg <johannes@truschnigg.info>
Sun, 4 Sep 2022 09:18:43 +0000 (11:18 +0200)
sqm_lagthrottle.sh

index dd2342324b69516301b20a04a77ce0febc3b6608..bc7bda744dba7879fbddae72ec1d9350b0bcaa29 100755 (executable)
@@ -115,7 +115,7 @@ then
   set +x
   if [ ${_cfg_ok} -ne 0 ]
   then
   set +x
   if [ ${_cfg_ok} -ne 0 ]
   then
-    printf 'FATAL: Configuration delta in "%s" could not be evaluated without errors."\n' >&2
+    printf 'FATAL: Configuration delta in "%s" could not be evaluated without errors."\n' "${SQML_CFGFILE}" >&2
     exit 1
   fi
   PS4="${_ps4}"
     exit 1
   fi
   PS4="${_ps4}"
@@ -272,7 +272,7 @@ _restore_saved_bw() {
 
 set -u
 
 
 set -u
 
-trap ':' SIGINT SIGTERM
+trap ':' INT TERM
 
 fping --loop --retry=1 --size=1280 --period="${PING_INTERVAL}" --random ${PING_PEERS} 2>/dev/null \
 | awk \
 
 fping --loop --retry=1 --size=1280 --period="${PING_INTERVAL}" --random ${PING_PEERS} 2>/dev/null \
 | awk \