From: Johannes Truschnigg Date: Sat, 3 Sep 2022 17:08:36 +0000 (+0200) Subject: Reset PS4 to prevent potential unwanted xtrace effects X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=8d0c48564255e8cea4fa4bebfc961e2e566e0f9e;p=sqm_lagthrottle Reset PS4 to prevent potential unwanted xtrace effects --- diff --git a/sqm_lagthrottle.sh b/sqm_lagthrottle.sh index fa970cb..4ee6558 100755 --- a/sqm_lagthrottle.sh +++ b/sqm_lagthrottle.sh @@ -103,6 +103,7 @@ done if [ -r "${SQML_CFGFILE}" ] && sh -n "${SQML_CFGFILE}" then printf '# INFO: Evaluating configuration file at "%s"...\n' "${SQML_CFGFILE}" + _ps4="${PS4}" eval "PS4='# CONFIG: ' set -x; $(grep -E '[A-Z][A-Z_]+=' "${SQML_CFGFILE}"); set +x" _cfg_ok=$? set +x @@ -111,6 +112,7 @@ then printf 'FATAL: Configuration delta in "%s" could not be evaluated without errors."\n' >&2 exit 1 fi + PS4="${_ps4}" fi