mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Prepare for multiple options in actions files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
ad4709cb6d
commit
fc3606a489
@ -1478,14 +1478,20 @@ sub process_actions() {
|
||||
|
||||
fatal_error "Invalid Action Name ($action)" unless $action =~ /^[a-zA-Z][\w-]*$/;
|
||||
|
||||
if ( $options eq 'inline' ) {
|
||||
$type = INLINE;
|
||||
} elsif ( $options eq 'noinline' ) {
|
||||
$noinline = 1;
|
||||
} else {
|
||||
fatal_error "Invalid option($options)" unless $options eq '-';
|
||||
if ( $options ne '-' ) {
|
||||
for ( split_list( $options, 'option' ) ) {
|
||||
if ( $_ eq 'inline' ) {
|
||||
$type = INLINE;
|
||||
} elsif ( $_ eq 'noinline' ) {
|
||||
$noinline = 1;
|
||||
} else {
|
||||
fatal_error "Invalid option ($_)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fatal_error "Conflicting OPTIONS ($options)" if $noinline && $type == INLINE;
|
||||
|
||||
if ( my $actiontype = $targets{$action} ) {
|
||||
if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) {
|
||||
if ( $actions{$action}->{noinline} ) {
|
||||
|
Loading…
Reference in New Issue
Block a user