From 8d0c48564255e8cea4fa4bebfc961e2e566e0f9e Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Sat, 3 Sep 2022 19:08:36 +0200 Subject: [PATCH] Reset PS4 to prevent potential unwanted xtrace effects --- sqm_lagthrottle.sh | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5