Restructure process_actions1 to be like the Shell version

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6200 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-02 21:43:04 +00:00
parent 7aec5dc398
commit 72f278b704

View File

@ -264,12 +264,8 @@ sub process_actions1() {
fatal_error "Invalid Action Name: $action"; fatal_error "Invalid Action Name: $action";
} }
$targets{$action} = ACTION;
fatal_error "Invalid Action Name: $action" unless "\L$action" =~ /^[a-z]\w*$/; fatal_error "Invalid Action Name: $action" unless "\L$action" =~ /^[a-z]\w*$/;
new_action $action;
my $actionfile = find_file "action.$action"; my $actionfile = find_file "action.$action";
fatal_error "Missing Action File: $actionfile" unless -f $actionfile; fatal_error "Missing Action File: $actionfile" unless -f $actionfile;
@ -293,8 +289,6 @@ sub process_actions1() {
fatal_error "Invalid TARGET ($target)" if $targettype & STANDARD; fatal_error "Invalid TARGET ($target)" if $targettype & STANDARD;
fatal_error "An action may not invoke itself" if $target eq $action;
add_requiredby $wholetarget, $action if $targettype & ACTION; add_requiredby $wholetarget, $action if $targettype & ACTION;
} else { } else {
$target =~ s!/.*$!!; $target =~ s!/.*$!!;
@ -329,6 +323,10 @@ sub process_actions1() {
} }
pop_open; pop_open;
$targets{$action} = ACTION;
new_action $action;
} }
} }
} }