From 9912f49a5a3eb1a310caaf724a9270bb8a3e6e4c Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 26 Jun 2007 13:56:27 +0000 Subject: [PATCH] Establish $level and $tag correctly before invoking Action extension script git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6678 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Actions.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shorewall-perl/Shorewall/Actions.pm b/Shorewall-perl/Shorewall/Actions.pm index 6ce2feced..6cff9ab28 100644 --- a/Shorewall-perl/Shorewall/Actions.pm +++ b/Shorewall-perl/Shorewall/Actions.pm @@ -195,6 +195,10 @@ sub createlogactionchain( $$ ) { if ( -f $file ) { progress_message "Processing $file..."; + ( $level, my $tag ) = split /:/, $level; + + $tag = $tag || ''; + unless ( my $return = eval `cat $file` ) { fatal_error "Couldn't parse $file: $@" if $@; fatal_error "Couldn't do $file: $!" unless defined $return; @@ -218,7 +222,9 @@ sub createsimpleactionchain( $ ) { if ( -f $file ) { progress_message "Processing $file..."; - + + my ( $level, $tag ) = ( '', '' ); + unless ( my $return = eval `cat $file` ) { fatal_error "Couldn't parse $file: $@" if $@; fatal_error "Couldn't do $file: $!" unless defined $return;