From 44b3c12d946ec758e8b569f3348b216826a59df3 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Mon, 7 Dec 2020 14:57:03 -0500 Subject: [PATCH] Keep shellcheck from complaining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code was correct, but shellcheck didn’t recognize that ‘n’ had been assigned as a local variable. --- network/vif-route-qubes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/vif-route-qubes b/network/vif-route-qubes index 5624ca6..51bf47e 100755 --- a/network/vif-route-qubes +++ b/network/vif-route-qubes @@ -48,8 +48,8 @@ network_hooks() { } conntrack_purge () { - local 'n=(0|[1-9][0-9]*)' output deleted msg - msg='flow entries have been deleted\.$' + local n output deleted msg + n='(0|[1-9][0-9]*)' msg='flow entries have been deleted\.$' deleted="^conntrack v$n\\.$n\\.$n \\(conntrack-tools\\): $n $msg" output=$(LC_ALL=C exec conntrack -D "$@" 2>&1 >/dev/null) || : [[ "$output" =~ $deleted ]]