mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +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,13 +1478,19 @@ sub process_actions() {
|
|||||||
|
|
||||||
fatal_error "Invalid Action Name ($action)" unless $action =~ /^[a-zA-Z][\w-]*$/;
|
fatal_error "Invalid Action Name ($action)" unless $action =~ /^[a-zA-Z][\w-]*$/;
|
||||||
|
|
||||||
if ( $options eq 'inline' ) {
|
if ( $options ne '-' ) {
|
||||||
|
for ( split_list( $options, 'option' ) ) {
|
||||||
|
if ( $_ eq 'inline' ) {
|
||||||
$type = INLINE;
|
$type = INLINE;
|
||||||
} elsif ( $options eq 'noinline' ) {
|
} elsif ( $_ eq 'noinline' ) {
|
||||||
$noinline = 1;
|
$noinline = 1;
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Invalid option($options)" unless $options eq '-';
|
fatal_error "Invalid option ($_)";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal_error "Conflicting OPTIONS ($options)" if $noinline && $type == INLINE;
|
||||||
|
|
||||||
if ( my $actiontype = $targets{$action} ) {
|
if ( my $actiontype = $targets{$action} ) {
|
||||||
if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) {
|
if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user