Keep shellcheck from complaining
The code was correct, but shellcheck didn’t recognize that ‘n’ had been assigned as a local variable.
This commit is contained in:
parent
d960f7af85
commit
44b3c12d94
@ -48,8 +48,8 @@ network_hooks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
conntrack_purge () {
|
conntrack_purge () {
|
||||||
local 'n=(0|[1-9][0-9]*)' output deleted msg
|
local n output deleted msg
|
||||||
msg='flow entries have been deleted\.$'
|
n='(0|[1-9][0-9]*)' msg='flow entries have been deleted\.$'
|
||||||
deleted="^conntrack v$n\\.$n\\.$n \\(conntrack-tools\\): $n $msg"
|
deleted="^conntrack v$n\\.$n\\.$n \\(conntrack-tools\\): $n $msg"
|
||||||
output=$(LC_ALL=C exec conntrack -D "$@" 2>&1 >/dev/null) || :
|
output=$(LC_ALL=C exec conntrack -D "$@" 2>&1 >/dev/null) || :
|
||||||
[[ "$output" =~ $deleted ]]
|
[[ "$output" =~ $deleted ]]
|
||||||
|
Loading…
Reference in New Issue
Block a user