Add a function to allow actions to be used from extension scripts

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4682 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-10-14 20:16:49 +00:00
parent 839ec468cf
commit e2b910f202

View File

@ -25,6 +25,22 @@
# (either explicitly specified or defaulted). # (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 # 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 # process_actions3() is in the compiler. What follows is called from that function when the action
# being processed is not a builtin. # being processed is not a builtin.
process_action3() { process_action3() {