mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 03:10:39 +01:00
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:
parent
7aec5dc398
commit
72f278b704
@ -264,12 +264,8 @@ sub process_actions1() {
|
||||
fatal_error "Invalid Action Name: $action";
|
||||
}
|
||||
|
||||
$targets{$action} = ACTION;
|
||||
|
||||
fatal_error "Invalid Action Name: $action" unless "\L$action" =~ /^[a-z]\w*$/;
|
||||
|
||||
new_action $action;
|
||||
|
||||
my $actionfile = find_file "action.$action";
|
||||
|
||||
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 "An action may not invoke itself" if $target eq $action;
|
||||
|
||||
add_requiredby $wholetarget, $action if $targettype & ACTION;
|
||||
} else {
|
||||
$target =~ s!/.*$!!;
|
||||
@ -329,6 +323,10 @@ sub process_actions1() {
|
||||
}
|
||||
|
||||
pop_open;
|
||||
|
||||
$targets{$action} = ACTION;
|
||||
|
||||
new_action $action;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user