From 378c791f216a4c3a0b0c0262aec4c3cc187e9bef Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 9 Feb 2022 18:10:47 +0100 Subject: [PATCH] TT#14008 Shellcheck fixes Fixup for git commit 23f5660314, fixing SC2034 (x appears unused) + SC2181 (check exit code directly). Change-Id: I50684e8e76940153c98d02210ac349f24962bac4 --- debian/ngcp-rtpengine-iptables-setup | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/ngcp-rtpengine-iptables-setup b/debian/ngcp-rtpengine-iptables-setup index 32bacc900..bb588ce02 100755 --- a/debian/ngcp-rtpengine-iptables-setup +++ b/debian/ngcp-rtpengine-iptables-setup @@ -76,7 +76,7 @@ firewall_teardown() # The daemon might take a little while to stop: keep trying to remove the # table until we can. - for x in $(seq 1 10); do + for _ in $(seq 1 10); do TABLE_REMOVE_SUCCESS=true if [ ! -e /proc/rtpengine/control ]; then break @@ -86,8 +86,7 @@ firewall_teardown() break fi - echo "del $TABLE" >/proc/rtpengine/control 2>/dev/null - if [ $? -eq 0 ]; then + if echo "del $TABLE" >/proc/rtpengine/control 2>/dev/null; then break fi @@ -108,7 +107,7 @@ firewall_teardown() ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null # The module refcount might also be delayed going to zero. - for x in $(seq 1 10); do + for _ in $(seq 1 10); do MODULE_UNLOAD_SUCCESS=true if ! lsmod | grep -q "$MODNAME"; then break