diff --git a/Shorewall/lib.actions b/Shorewall/lib.actions index a20c29f61..d16248b70 100644 --- a/Shorewall/lib.actions +++ b/Shorewall/lib.actions @@ -25,6 +25,22 @@ # (either explicitly specified or defaulted). # +# +# Function to create/find appropriate action chain -- callable in user scripts +# that want to invoke an action. +# +get_actionchain() # $1 = Action from a rule, including log level and tag if any +{ + if list_search ${1%%:*} $ACTIONS; then + if ! list_search $1 $USEDACTIONS; then + createactionchain $1 + USEDACTIONS="$USEDACTIONS $1" + fi + + echo $(find_logactionchain $1) + fi +} + # # Add one Filter Rule from an action -- Helper function for the action file processor # @@ -716,8 +732,8 @@ process_actions2() { } # -# process_action3() is in the compiler. What follows is called from that function when the action -# being processed is not a builtin. +# process_actions3() is in the compiler. What follows is called from that function when the action +# being processed is not a builtin. process_action3() {