From 09d44df5482fd67f7bc184d7788c533e5df83730 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 14 Nov 2006 18:19:16 +0000 Subject: [PATCH] Bring forward action processing fix git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4873 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index 77a73cd45..f1fc14eaa 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -1198,6 +1198,16 @@ createlogactionchain() # $1 = Action Name, $2 = Log Level [: Log Tag ] createactionchain() # $1 = Action, including log level and tag if any { + create_simple_chain() + { + CHAIN=$1 + LEVEL= + TAG= + createchain $CHAIN no + + process_action_file $CHAIN + } + case $1 in *::*) fatal_error "Invalid ACTION $1" @@ -1208,15 +1218,15 @@ createactionchain() # $1 = Action, including log level and tag if any ;; *:*) set -- $(split $1) - createlogactionchain $1 $2 + + if [ "x$2" = xnone ]; then + create_simple_chain $1 + else + createlogactionchain $1 $2 + fi ;; *) - CHAIN=$1 - LEVEL= - TAG= - createchain $CHAIN no - - process_action_file $CHAIN + create_simple_chain $1 ;; esac } @@ -1229,13 +1239,21 @@ find_logactionchain() # $1 = Action, including log level and tag if any { local fullaction=$1 action=${1%%:*} level= chains= + find_simpleaction() { + havechain $action || fatal_error "Fatal error in find_logactionchain" + echo $action + } + case $fullaction in *:*) level=${fullaction#*:} + if [ "x$level" = xnone ]; then + find_simpleaction + return + fi ;; *) - havechain $action || fatal_error "Fatal error in find_logactionchain" - echo $action + find_simpleaction return ;; esac