From: Johannes Truschnigg Date: Sat, 19 Mar 2022 16:56:18 +0000 (+0100) Subject: Convert to if/then for consistency X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=c516a678e0d0ae987e7741339424ad8c3cd15581;p=sqm_lagthrottle Convert to if/then for consistency --- diff --git a/lagdetect.sh b/lagdetect.sh index 8fe0eb1..331cf63 100755 --- a/lagdetect.sh +++ b/lagdetect.sh @@ -87,7 +87,11 @@ return 1 for p in traceroute fping awk tc ip do - type "${p}" >/dev/null || { printf 'FATAL: Required program "%s" not installed.\n' "${p}" >&2; exit 1; } + if ! type "${p}" >/dev/null + then + printf 'FATAL: Required program "%s" not installed.\n' "${p}" >&2 + exit 1 + fi done