From 2817a8144c685d3ca18b7ca27064179ac318924e Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 29 Sep 2020 13:33:40 +0200 Subject: [PATCH] `action.d/bsd-ipfw.conf`: small amend (gh-2836) simplifying awk condition/code (position starts from `` and increases whilst used) --- config/action.d/bsd-ipfw.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/action.d/bsd-ipfw.conf b/config/action.d/bsd-ipfw.conf index 7f04fe7c..444192d3 100644 --- a/config/action.d/bsd-ipfw.conf +++ b/config/action.d/bsd-ipfw.conf @@ -15,7 +15,7 @@ # Values: CMD # actionstart = ipfw show | fgrep -c -m 1 -s 'table()' > /dev/null 2>&1 || ( - num=$(ipfw show | awk 'BEGIN { b = } { if ($1 < b) {} else if ($1 == b) { b = $1 + 1 } else { e = b } } END { if (e) print e
else print b }'); + num=$(ipfw show | awk 'BEGIN { b = } { if ($1 == b) { b = $1 + 1 } } END { print b }'); ipfw -q add "$num" from table\(
\) to me ; echo "$num" > "" )